Merge pull request #626 from thsrite/main

This commit is contained in:
jxxghp 2023-09-20 16:14:38 +08:00 committed by GitHub
commit 61694f4c2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -635,7 +635,7 @@ class TransferChain(ChainBase):
break break
if str(parent_path.parent) != str(path.root): if str(parent_path.parent) != str(path.root):
# 父目录非根目录,才删除父目录 # 父目录非根目录,才删除父目录
if not SystemUtils.exits_files(path.parent, settings.RMT_MEDIAEXT): if not SystemUtils.exits_files(parent_path, settings.RMT_MEDIAEXT):
# 当前路径下没有媒体文件则删除 # 当前路径下没有媒体文件则删除
shutil.rmtree(parent_path) shutil.rmtree(parent_path)
logger.warn(f"目录 {parent_path} 已删除") logger.warn(f"目录 {parent_path} 已删除")