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,7 +263,8 @@ def resumable_iteration(context: InstaloaderContext,
|
|||||||
try:
|
try:
|
||||||
yield is_resuming, start_index
|
yield is_resuming, start_index
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
os.makedirs(os.path.dirname(resume_file_path), exist_ok=True)
|
if os.path.dirname(resume_file_path):
|
||||||
|
os.makedirs(os.path.dirname(resume_file_path), exist_ok=True)
|
||||||
save(iterator.freeze(), resume_file_path)
|
save(iterator.freeze(), resume_file_path)
|
||||||
context.log("\nSaved resume information to {}.".format(resume_file_path))
|
context.log("\nSaved resume information to {}.".format(resume_file_path))
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user