From 727c1613cc73841a2fa886ab4adb5083aafe1549 Mon Sep 17 00:00:00 2001 From: LeeCQ Date: Sat, 2 Mar 2024 22:28:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + tools/create_storage.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0a8f42b..77eb48e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ local_test* tmp/ config.json config.yaml +.DS_Store .alist-sync-cache/ alist_sync/.alist-sync-cache/ diff --git a/tools/create_storage.py b/tools/create_storage.py index 411234d..2abff64 100644 --- a/tools/create_storage.py +++ b/tools/create_storage.py @@ -31,8 +31,9 @@ ) # 如果--, 删除全部存储器 -if os.getenv("_RELOAD_STORAGE"): - for i in local_client.admin_storage_list().data.content: +print("_RELOAD_STORAGE =", os.getenv("_RELOAD_STORAGE")) +if os.getenv("_RELOAD_STORAGE") == "true": + for i in local_client.admin_storage_list().data.content or []: local_client.admin_storage_delete(i.id) # 创建本地存储器