Fix rare FileNotFoundError in resumable_iterator()
... that occured when using a path name for the FrozenNodeIterator file whose dirname was ''.
This commit is contained in:
parent
ed3fce45da
commit
3530cdc55c
@ -263,6 +263,7 @@ def resumable_iteration(context: InstaloaderContext,
|
||||
try:
|
||||
yield is_resuming, start_index
|
||||
except KeyboardInterrupt:
|
||||
if os.path.dirname(resume_file_path):
|
||||
os.makedirs(os.path.dirname(resume_file_path), exist_ok=True)
|
||||
save(iterator.freeze(), resume_file_path)
|
||||
context.log("\nSaved resume information to {}.".format(resume_file_path))
|
||||
|
Loading…
Reference in New Issue
Block a user