Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
create asset dir if missing when assets.json is saved
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Szymaniak committed Nov 17, 2018
1 parent 5c12807 commit a246b06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions subsync/assets/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ async def loadList(self):

async def saveList(self):
try:
os.makedirs(os.path.dirname(config.assetspath), exist_ok=True)
with open(config.assetspath, 'w', encoding='utf8') as fp:
json.dump(self.assets, fp, indent=4)

Expand Down

0 comments on commit a246b06

Please sign in to comment.