1
0
Fork 0

fix infinite appending paths

This commit is contained in:
Nick Sweeting 2017-10-30 03:31:28 -05:00
parent c8068caff0
commit cb0d6526d7

View file

@ -42,8 +42,8 @@ def archive_links(out_dir, links, export_path, resume=None):
to_archive = links_after_timestamp(links, resume) to_archive = links_after_timestamp(links, resume)
try: try:
for idx, link in enumerate(to_archive): for idx, link in enumerate(to_archive):
out_dir = os.path.join(out_dir, link['timestamp']) link_dir = os.path.join(out_dir, link['timestamp'])
archive_link(out_dir, link) archive_link(link_dir, link)
except (KeyboardInterrupt, SystemExit, Exception) as e: except (KeyboardInterrupt, SystemExit, Exception) as e:
print('{red}[X] Archive update stopped on #{idx} out of {total} links{reset}'.format( print('{red}[X] Archive update stopped on #{idx} out of {total} links{reset}'.format(