From f44f6468786383dd04901b166190ef9c7ca8c19a Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sat, 8 May 2021 07:32:09 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E9=99=84=E4=BB=B6=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catch/system/model/Attachments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catch/system/model/Attachments.php b/catch/system/model/Attachments.php index 000b03e..7449c33 100644 --- a/catch/system/model/Attachments.php +++ b/catch/system/model/Attachments.php @@ -77,8 +77,8 @@ class Attachments extends CatchModel if ($attachment->delete()) { if ($attachment->driver == 'local') { $localPath = config('filesystem.disks.local.root') . DIRECTORY_SEPARATOR; - $path = $localPath . str_replace('\\','\/', $attachment->path); - if (file_exists($path)) { + $path = str_replace('\\','\/', $attachment->path); + if (file_exists($localPath . $path)) { Filesystem::delete($path); } } else {