diff --git a/app/modules/filemanager/storages/rclone.py b/app/modules/filemanager/storages/rclone.py index 1f90448ee..1e794cb5d 100644 --- a/app/modules/filemanager/storages/rclone.py +++ b/app/modules/filemanager/storages/rclone.py @@ -114,7 +114,7 @@ def list(self, fileitm: schemas.FileItem) -> Optional[List[schemas.FileItem]]: return [self.__get_rcloneitem(item) for item in items] except Exception as err: logger.error(f"rclone浏览文件失败:{err}") - return None + return [] def create_folder(self, fileitm: schemas.FileItem, name: str) -> Optional[schemas.FileItem]: """ diff --git a/app/modules/filemanager/storages/u115.py b/app/modules/filemanager/storages/u115.py index 23c2082e7..ed88399a7 100644 --- a/app/modules/filemanager/storages/u115.py +++ b/app/modules/filemanager/storages/u115.py @@ -160,7 +160,7 @@ def list(self, fileitem: schemas.FileItem) -> Optional[List[schemas.FileItem]]: 浏览文件 """ if not self.__init_cloud(): - return None + return [] try: items = self.cloud.storage().list(dir_id=fileitem.fileid) return [schemas.FileItem(