diff --git a/gallery_dl/path.py b/gallery_dl/path.py index c34b8cd1..84ee7afd 100644 --- a/gallery_dl/path.py +++ b/gallery_dl/path.py @@ -141,7 +141,7 @@ class PathFormat(): try: return open(self.temppath, mode) except FileNotFoundError: - os.makedirs(self.realdirectory, exist_ok=True) + os.makedirs(self.realdirectory) return open(self.temppath, mode) def exists(self): @@ -322,7 +322,7 @@ class PathFormat(): os.replace(self.temppath, self.realpath) except FileNotFoundError: # delayed directory creation - os.makedirs(self.realdirectory, exist_ok=True) + os.makedirs(self.realdirectory) continue except OSError: # move across different filesystems diff --git a/gallery_dl/postprocessor/metadata.py b/gallery_dl/postprocessor/metadata.py index 5e8f3e9a..4e862398 100644 --- a/gallery_dl/postprocessor/metadata.py +++ b/gallery_dl/postprocessor/metadata.py @@ -95,7 +95,7 @@ class MetadataPP(PostProcessor): with open(path, "w", encoding="utf-8") as fp: self.write(fp, pathfmt.kwdict) except FileNotFoundError: - os.makedirs(directory, exist_ok=True) + os.makedirs(directory) with open(path, "w", encoding="utf-8") as fp: self.write(fp, pathfmt.kwdict)