bug-fix if settings directory is a symlink.

This commit is contained in:
ebolam 2022-01-22 21:43:32 -05:00
parent d12a6a5620
commit 47ec22873d
1 changed files with 2 additions and 1 deletions

View File

@ -2199,7 +2199,8 @@ def savesettings():
# Write it # Write it
if not os.path.exists('settings'): if not os.path.exists('settings'):
os.mkdir('settings') if not os.path.islink('settings'):
os.mkdir('settings')
file = open("settings/" + getmodelname().replace('/', '_') + ".settings", "w") file = open("settings/" + getmodelname().replace('/', '_') + ".settings", "w")
try: try:
file.write(json.dumps(js, indent=3)) file.write(json.dumps(js, indent=3))