refuse to manual-collate a nonexistent path
This commit is contained in:
parent
e1b2741253
commit
7596ed49be
|
@ -208,6 +208,12 @@ def manual_collate(args):
|
||||||
if collation_dir.exists() and len(list(collation_dir.iterdir())) > 0:
|
if collation_dir.exists() and len(list(collation_dir.iterdir())) > 0:
|
||||||
print(f'Collation directory already exists!')
|
print(f'Collation directory already exists!')
|
||||||
return
|
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)
|
collation_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
index = 0
|
index = 0
|
||||||
|
|
Loading…
Reference in a new issue