From d7c8b08d7a6854e84f9d4d9bd0f4ceb74763b7e2 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 17 Nov 2024 15:23:30 +0800 Subject: [PATCH] fix 115 --- app/modules/filemanager/storages/u115.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/modules/filemanager/storages/u115.py b/app/modules/filemanager/storages/u115.py index 124b89ac1..7f4fa1600 100644 --- a/app/modules/filemanager/storages/u115.py +++ b/app/modules/filemanager/storages/u115.py @@ -241,7 +241,7 @@ def get_item(self, path: Path) -> Optional[schemas.FileItem]: path=item.path + ("/" if item.is_directory else ""), name=item.name, size=item.size, - extension=item.suffix[1:] if not item.is_directory else None, + extension=Path(item.name).suffix[1:] if not item.is_directory else None, modify_time=item.mtime, thumbnail=item.get("thumb") ) @@ -267,7 +267,7 @@ def detail(self, fileitem: schemas.FileItem) -> Optional[schemas.FileItem]: path=item.path + ("/" if item.is_directory else ""), name=item.name, size=item.size, - extension=item.suffix[1:] if not item.is_directory else None, + extension=Path(item.name).suffix[1:] if not item.is_directory else None, modify_time=item.mtime, thumbnail=item.get("thumb") )