Skip to content

Commit

Permalink
Create the recent files directory if absent.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bzero committed Aug 28, 2024
1 parent 81d997b commit 08a6f98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions typstwriter/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def read(self):
def write(self):
"""Write the list of recently used files to disk."""
try:
os.makedirs(os.path.dirname(self.path), exist_ok=True)
with open(self.path, "w") as f:
for line in self.recent_files:
f.write(line + "\n")
Expand Down

0 comments on commit 08a6f98

Please sign in to comment.