From 77501b3277aa24f8e2c8725200d2d2e385333394 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Wed, 17 Mar 2021 00:22:30 -0500 Subject: [PATCH] Only touch non property things if file --- test_data/mock_backup_data/mock_backupdir.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test_data/mock_backup_data/mock_backupdir.py b/test_data/mock_backup_data/mock_backupdir.py index 5d94843..8428d1a 100755 --- a/test_data/mock_backup_data/mock_backupdir.py +++ b/test_data/mock_backup_data/mock_backupdir.py @@ -16,9 +16,11 @@ def fill_mock_backup_dir(rootdir: Path, target_dir: Path, verbose=False): for other_file in filter( lambda path: path.suffix != ".properties", rootdir.glob("*") ): - print(f"Data/apk file: {other_file}") - dest = target_dir / other_file.name - dest.touch(exist_ok=True) + if other_file.is_file(): + if verbose: + print(f"Data/apk file: {other_file}") + dest = target_dir / other_file.name + dest.touch(exist_ok=True) (target_dir / "marker").touch()