fix: 历史记录中重新整理成功记录时的问题
This commit is contained in:
@ -56,16 +56,20 @@ def manual_transfer(path: str = None,
|
|||||||
return schemas.Response(success=False, message=f"历史记录不存在,ID:{logid}")
|
return schemas.Response(success=False, message=f"历史记录不存在,ID:{logid}")
|
||||||
# 强制转移
|
# 强制转移
|
||||||
force = True
|
force = True
|
||||||
# 源路径
|
if history.status:
|
||||||
in_path = Path(history.src)
|
# 重新整理成功的转移,则使用成功的 dest 做 in_path
|
||||||
# 目的路径
|
in_path = Path(history.dest)
|
||||||
if history.dest and str(history.dest) != "None":
|
else:
|
||||||
# 删除旧的已整理文件
|
# 源路径
|
||||||
transfer.delete_files(Path(history.dest))
|
in_path = Path(history.src)
|
||||||
if not target:
|
# 目的路径
|
||||||
target = transfer.get_root_path(path=history.dest,
|
if history.dest and str(history.dest) != "None":
|
||||||
type_name=history.type,
|
# 删除旧的已整理文件
|
||||||
category=history.category)
|
transfer.delete_files(Path(history.dest))
|
||||||
|
if not target:
|
||||||
|
target = transfer.get_root_path(path=history.dest,
|
||||||
|
type_name=history.type,
|
||||||
|
category=history.category)
|
||||||
elif path:
|
elif path:
|
||||||
in_path = Path(path)
|
in_path = Path(path)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user