From d278224ff1d261f2597c65645c78e08b4b1ae77f Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 5 Feb 2026 14:16:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BC=98=E5=8C=96=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E6=8F=92=E4=BB=B6=E5=AD=98=E5=82=A8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E6=A3=80=E6=B5=8B=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/filemanager/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/modules/filemanager/__init__.py b/app/modules/filemanager/__init__.py index 8092af74..12de52b0 100644 --- a/app/modules/filemanager/__init__.py +++ b/app/modules/filemanager/__init__.py @@ -95,12 +95,11 @@ class FileManagerModule(_ModuleBase): return False, f"{d.name} 的下载目录 {download_path} 与媒体库目录 {library_path} 不在同一磁盘,无法硬链接" # 存储 storage_oper = self.__get_storage_oper(d.storage) - if not storage_oper: - return False, f"{d.name} 的存储类型 {d.storage} 不支持" - if not storage_oper.check(): - return False, f"{d.name} 的存储测试不通过" - if d.transfer_type and d.transfer_type not in storage_oper.support_transtype(): - return False, f"{d.name} 的存储不支持 {d.transfer_type} 整理方式" + if storage_oper: + if not storage_oper.check(): + return False, f"{d.name} 的存储测试不通过" + if d.transfer_type and d.transfer_type not in storage_oper.support_transtype(): + return False, f"{d.name} 的存储不支持 {d.transfer_type} 整理方式" return True, ""