refuse to manual-collate a nonexistent path

This commit is contained in:
xenofem 2024-01-22 07:43:24 -05:00
parent e1b2741253
commit 7596ed49be

View file

@ -208,6 +208,12 @@ def manual_collate(args):
if collation_dir.exists() and len(list(collation_dir.iterdir())) > 0:
print(f'Collation directory already exists!')
return
nonexistent = [path for path in args.paths if not path.exists()]
if len(nonexistent) > 0:
print(f'Nonexistent paths: {nonexistent}')
return
collation_dir.mkdir(parents=True, exist_ok=True)
index = 0