Skip to content

Commit 8c4568e

Browse files
committed
fix: cache and data folder missing
- fix #5
1 parent 29e758e commit 8c4568e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ note: not all emojis are available in all languages.</string>
12101210
</dict>
12111211
</array>
12121212
<key>version</key>
1213-
<string>1.2.6</string>
1213+
<string>1.2.7</string>
12141214
<key>webaddress</key>
12151215
<string>https://github.com/BenjaminOddou/alfred-emoji-wine</string>
12161216
</dict>

src/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
padding = 10
1111
cache_folder_path = os.environ['alfred_workflow_cache'] # ~/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.benjamino.emoji_wine
1212
data_folder_path = os.environ['alfred_workflow_data'] # ~/Library/Application Support/Alfred/Workflow Data/com.benjamino.emoji_wine
13+
for folder in [cache_folder_path, data_folder_path]:
14+
os.makedirs(folder, exist_ok=True)
1315
assets_folder_path = f'{os.getcwd()}/icons/assets'
1416
api_file_path = f'{cache_folder_path}/api.json'
1517
tags_file_path = f'{data_folder_path}/tags-{language}.json'

0 commit comments

Comments
 (0)