mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-05 11:47:50 +08:00
fix(LocalStorage): 添加源文件与目标文件相同的检查,防止文件被删除。
This commit is contained in:
@@ -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):
|
||||
# 复制成功删除源文件
|
||||
|
||||
Reference in New Issue
Block a user