Skip to content

Commit 764d13e

Browse files
committed
fixed ignored_files not working
1 parent 213def2 commit 764d13e

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

quick_backup_multi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def copy_worlds(src: str, dst: str):
4646
dst_path = os.path.join(dst, world)
4747
server_inst.logger.info('copying {} -> {}'.format(src_path, dst_path))
4848
if os.path.isdir(src_path):
49-
shutil.copytree(src_path, dst_path, ignore=lambda path, files: filter(config.is_file_ignored, files))
49+
shutil.copytree(src_path, dst_path, ignore=lambda path, files: set(filter(config.is_file_ignored, files)))
5050
elif os.path.isfile(src_path):
5151
dst_dir = os.path.dirname(dst_path)
5252
if not os.path.isdir(dst_dir):

quick_backup_multi/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def is_file_ignored(self, file_name: str) -> bool:
4646
return True
4747
if file_name == item:
4848
return True
49+
return False
4950

5051

5152
if __name__ == '__main__':

0 commit comments

Comments
 (0)