diff --git a/app/chain/transfer.py b/app/chain/transfer.py index 12236fee3..794ddc041 100644 --- a/app/chain/transfer.py +++ b/app/chain/transfer.py @@ -635,7 +635,7 @@ def delete_files(path: Path): break 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) logger.warn(f"目录 {parent_path} 已删除")