更新 local.py

This commit is contained in:
jxxghp
2024-09-20 14:01:38 +08:00
committed by GitHub
parent e2bf0cd457
commit 6431524e61

View File

@@ -187,7 +187,11 @@ class LocalStorage(StorageBase):
"""
上传文件
"""
file_path = path.rename(fileitem.path)
file_path = Path(fileitem.path)
code, message = SystemUtils.move(path, file_path)
if code != 0:
logger.error(f"移动文件失败:{message}")
return None
return self.__get_diritem(file_path)
def copy(self, fileitem: schemas.FileItem, target_file: Path) -> bool: