mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
Refactor: Use copy instead of move for file operations
Co-authored-by: jxxghp <jxxghp@qq.com>
This commit is contained in:
@@ -425,7 +425,7 @@ class TransHandler:
|
|||||||
# 复制文件到新目录
|
# 复制文件到新目录
|
||||||
target_fileitem = target_oper.get_folder(target_file.parent)
|
target_fileitem = target_oper.get_folder(target_file.parent)
|
||||||
if target_fileitem:
|
if target_fileitem:
|
||||||
if source_oper.move(fileitem, Path(target_fileitem.path), target_file.name):
|
if source_oper.copy(fileitem, Path(target_fileitem.path), target_file.name):
|
||||||
return target_oper.get_item(target_file), ""
|
return target_oper.get_item(target_file), ""
|
||||||
else:
|
else:
|
||||||
return None, f"【{target_storage}】{fileitem.path} 复制文件失败"
|
return None, f"【{target_storage}】{fileitem.path} 复制文件失败"
|
||||||
|
|||||||
Reference in New Issue
Block a user