Fix RarExists glob check not looking in workdir, moveto.

This commit is contained in:
voussoir 2020-11-06 23:50:45 -08:00
parent ebcc62d765
commit ae4a9ae390

View file

@ -292,7 +292,12 @@ def rarpar(
else: else:
basename = basename.format(timestamp=timestamp) basename = basename.format(timestamp=timestamp)
existing = winglob.glob(f'{basename}*.rar') existing = None
if workdir:
existing = existing or workdir.glob(f'{basename}*.rar')
if moveto:
existing = existing or moveto.glob(f'{basename}*.rar')
if existing: if existing:
raise RarExists(f'{existing[0]} already exists.') raise RarExists(f'{existing[0]} already exists.')