fix rclone
This commit is contained in:
parent
bfbd93b912
commit
f20c81efae
@ -402,6 +402,8 @@ class FileTransferModule(_ModuleBase):
|
|||||||
bluray_flag = SystemUtils.is_bluray_dir(in_path)
|
bluray_flag = SystemUtils.is_bluray_dir(in_path)
|
||||||
if bluray_flag:
|
if bluray_flag:
|
||||||
logger.info(f"{in_path} 是蓝光原盘文件夹")
|
logger.info(f"{in_path} 是蓝光原盘文件夹")
|
||||||
|
# 原文件大小
|
||||||
|
file_size = in_path.stat().st_size
|
||||||
# 目的路径
|
# 目的路径
|
||||||
new_path = self.get_rename_path(
|
new_path = self.get_rename_path(
|
||||||
path=target_dir,
|
path=target_dir,
|
||||||
@ -426,7 +428,7 @@ class FileTransferModule(_ModuleBase):
|
|||||||
return TransferInfo(success=True,
|
return TransferInfo(success=True,
|
||||||
path=in_path,
|
path=in_path,
|
||||||
target_path=new_path,
|
target_path=new_path,
|
||||||
total_size=new_path.stat().st_size,
|
total_size=file_size,
|
||||||
is_bluray=bluray_flag)
|
is_bluray=bluray_flag)
|
||||||
else:
|
else:
|
||||||
# 转移单个文件
|
# 转移单个文件
|
||||||
@ -467,7 +469,8 @@ class FileTransferModule(_ModuleBase):
|
|||||||
if new_file.stat().st_size < in_path.stat().st_size:
|
if new_file.stat().st_size < in_path.stat().st_size:
|
||||||
logger.info(f"目标文件已存在,但文件大小更小,将覆盖:{new_file}")
|
logger.info(f"目标文件已存在,但文件大小更小,将覆盖:{new_file}")
|
||||||
overflag = True
|
overflag = True
|
||||||
|
# 原文件大小
|
||||||
|
file_size = in_path.stat().st_size
|
||||||
# 转移文件
|
# 转移文件
|
||||||
retcode = self.__transfer_file(file_item=in_path,
|
retcode = self.__transfer_file(file_item=in_path,
|
||||||
new_file=new_file,
|
new_file=new_file,
|
||||||
@ -486,7 +489,7 @@ class FileTransferModule(_ModuleBase):
|
|||||||
path=in_path,
|
path=in_path,
|
||||||
target_path=new_file,
|
target_path=new_file,
|
||||||
file_count=1,
|
file_count=1,
|
||||||
total_size=new_file.stat().st_size,
|
total_size=file_size,
|
||||||
is_bluray=False,
|
is_bluray=False,
|
||||||
file_list=[str(in_path)],
|
file_list=[str(in_path)],
|
||||||
file_list_new=[str(new_file)])
|
file_list_new=[str(new_file)])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user