Skip to content

Commit

Permalink
更新 local.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp authored Sep 20, 2024
1 parent e2bf0cd commit 6431524
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/modules/filemanager/storages/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ def upload(self, fileitem: schemas.FileItem, path: Path) -> Optional[schemas.Fil
"""
上传文件
"""
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:
Expand Down

0 comments on commit 6431524

Please sign in to comment.