Merge pull request #234 from caryoscelus/fix-start-dir

Fix start dir
This commit is contained in:
caryoscelus 2023-11-08 14:51:06 +00:00 committed by GitHub
commit 1ba9f2bb56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@ class Config(object):
elif this_file.endswith("/core/src/Config.py"):
# Running as exe or source is at Application Support directory, put var files to outside of core dir
start_dir = this_file.replace("/core/src/Config.py", "")
elif this_file.endswith("usr/share/zeronet/src/Config.py"):
elif not os.access(this_file.replace('/src/Config.py', ''), os.R_OK | os.W_OK):
# Running from non-writeable location, e.g., AppImage
start_dir = os.path.expanduser("~/ZeroNet")
else: