From bdc66e55ca91340b4f9ac8f4d1a30f72bfc346eb Mon Sep 17 00:00:00 2001 From: TMs Date: Fri, 5 Sep 2025 20:02:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(LocalStorage):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=BA=90=E6=96=87=E4=BB=B6=E4=B8=8E=E7=9B=AE=E6=A0=87=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9B=B8=E5=90=8C=E7=9A=84=E6=A3=80=E6=9F=A5=EF=BC=8C?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E6=96=87=E4=BB=B6=E8=A2=AB=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/filemanager/storages/local.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/modules/filemanager/storages/local.py b/app/modules/filemanager/storages/local.py index 9db83ad1..6ed8c34c 100644 --- a/app/modules/filemanager/storages/local.py +++ b/app/modules/filemanager/storages/local.py @@ -294,6 +294,9 @@ class LocalStorage(StorageBase): try: src = Path(fileitem.path) dest = path / new_name + if src == dest: + # 目标和源文件相同,直接返回成功,不做任何操作 + return True if self.__should_show_progress(src, dest): if self._copy_with_progress(src, dest): # 复制成功删除源文件