Fix move_all.

This commit is contained in:
voussoir 2020-09-11 17:03:31 -07:00
parent 8f448ba554
commit 6f53cb6d8a

View file

@ -20,8 +20,9 @@ destination = pathclass.Path(sys.argv[-1])
if not destination.is_dir: if not destination.is_dir:
raise TypeError(destination) raise TypeError(destination)
if any(destination.with_child(file.basename).exists for file in files): for file in files:
raise Exception(file.basename) if destination.with_child(file.basename).exists:
raise Exception(file.basename)
for file in files: for file in files:
new_path = destination.with_child(file.basename) new_path = destination.with_child(file.basename)