Skip to content

Commit

Permalink
create icons folder if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Garulf committed Jul 16, 2021
1 parent 4570e56 commit 1029f91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def __init__(self):
super().__init__()

def filter(self, icon):
if not os.path.exists('./icons/'):
os.mkdir('./icons')
if not os.path.isfile('./icons/{}.svg'.format(icon['name'])):
with open('./icons/{}.svg'.format(icon['name']), 'w') as f:
f.write(SVG_FILE.format(icon['data']))
Expand Down

0 comments on commit 1029f91

Please sign in to comment.