Skip to content

Commit

Permalink
[postprocessor:metadata] fix error with '..' in directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Aug 14, 2022
1 parent 21ff77f commit 590f2e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gallery_dl/postprocessor/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def run(self, pathfmt):
with open(path, "w", encoding="utf-8") as fp:
self.write(fp, pathfmt.kwdict)
except FileNotFoundError:
os.makedirs(directory)
os.makedirs(directory, exist_ok=True)
with open(path, "w", encoding="utf-8") as fp:
self.write(fp, pathfmt.kwdict)

Expand Down

0 comments on commit 590f2e2

Please sign in to comment.