Skip to content

Commit

Permalink
fix crash if not nested
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryu1845 committed Jun 6, 2022
1 parent 8a2bb04 commit dd0f96d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion twspace_dl/twspace_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def download(self) -> None:
subprocess.run(cmd_old, check=True)
except subprocess.CalledProcessError as err:
raise RuntimeError(" ".join(err.cmd)) from err
os.makedirs(os.path.dirname(self.filename), exist_ok=True)
if os.path.dirname(self.filename):
os.makedirs(os.path.dirname(self.filename), exist_ok=True)
shutil.move(filename_old, self.filename + ".m4a")

logging.info("Finished downloading")

0 comments on commit dd0f96d

Please sign in to comment.