Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit edc7d0a

Browse files
authored
Solve the no such file or directory issue
Signed-off-by: Lyes Saadi <33597258+LyesSaadi@users.noreply.github.com>
1 parent f3588c7 commit edc7d0a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gradience/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)