diff --git a/app/modules/filetransfer/__init__.py b/app/modules/filetransfer/__init__.py index 64b0e26a..4b05af06 100644 --- a/app/modules/filetransfer/__init__.py +++ b/app/modules/filetransfer/__init__.py @@ -264,6 +264,9 @@ class FileTransferModule(_ModuleBase): """ retcode = 0 for file in src_dir.glob("**/*"): + # 过滤掉目录 + if file.is_dir(): + continue # 使用target_dir的父目录作为新的父目录 new_file = target_dir.joinpath(file.relative_to(src_dir)) if new_file.exists():