Skip to content

Commit

Permalink
tumblr_backup: Suppress early creation of post_dir
Browse files Browse the repository at this point in the history
Use path_to instead of open_file to avoid creating directories
unnecessarily early.
  • Loading branch information
cebtenzzre committed Jan 17, 2021
1 parent 9c8142e commit d59e628
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tumblr_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ def _backup(posts, post_respfiles):
continue
elif 'trail' in p and p['trail'] and 'is_current_item' not in p['trail'][-1]:
continue
if os.path.exists(open_file(lambda f: f, post.get_path())) and options.no_post_clobber:
if os.path.exists(path_to(*post.get_path())) and options.no_post_clobber:
continue # Post exists and no-clobber enabled
if options.filter and not options.filter.first(p):
self.filter_skipped += 1
Expand Down

0 comments on commit d59e628

Please sign in to comment.