From 1eb094bba50fd08d5fba74cba86902f953630815 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Thu, 14 Sep 2023 11:03:23 +0000 Subject: [PATCH] Fix detection of non-writeable start directory --- src/Config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Config.py b/src/Config.py index e92c653c..d5e459e7 100644 --- a/src/Config.py +++ b/src/Config.py @@ -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: