This commit is contained in:
thsrite
2024-07-15 13:35:06 +08:00
parent 2ba81ddfbf
commit 1d50a1b844

View File

@@ -923,7 +923,7 @@ class CloudAssistant(_PluginBase):
# 递归删除空目录,最多到三级深度
for depth, file_dir in enumerate(file_path.parents):
if depth >= 3:
if depth >= 3 and str(file_dir) == str(return_path):
break
if not any(file_dir.iterdir()): # 检查目录是否为空
logger.warning(f"删除空目录:{file_dir}")