This repository was archived by the owner on Jul 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,9 @@ def reload_user_defined_presets(self):
190190 buglog ("file" )
191191 # keep compatiblity with old presets
192192 if repo .name .endswith (".json" ):
193+ if not os .path .isdir (os .path .join (PRESET_DIR , "user" )):
194+ os .mkdir (os .path .join (PRESET_DIR , "user" ))
195+
193196 os .rename (repo , os .path .join (
194197 PRESET_DIR , "user" , repo .name ))
195198
Original file line number Diff line number Diff line change @@ -62,12 +62,8 @@ class GradiencePresetWindow(Adw.Window):
6262 custom_presets = {}
6363
6464 official_repositories = {
65- _ (
66- "Official"
67- ): "https://github.com/GradienceTeam/Community/raw/next/official.json" ,
68- _ (
69- "Curated"
70- ): "https://github.com/GradienceTeam/Community/raw/next/curated.json" ,
65+ "Official" : "https://github.com/GradienceTeam/Community/raw/next/official.json" ,
66+ "Curated" : "https://github.com/GradienceTeam/Community/raw/next/curated.json" ,
7167 }
7268
7369 search_results_list = []
@@ -343,6 +339,9 @@ def reload_pref_group(self):
343339 buglog ("file" )
344340 # keep compatiblity with old presets
345341 if repo .name .endswith (".json" ):
342+ if not os .path .isdir (os .path .join (preset_directory , "user" )):
343+ os .mkdir (os .path .join (preset_directory , "user" ))
344+
346345 os .rename (repo , os .path .join (
347346 preset_directory , "user" , repo .name ))
348347
You can’t perform that action at this time.
0 commit comments