From 0f0cf18f925f42af771504377abf474325594a23 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Tue, 24 Jan 2017 16:36:51 +0100 Subject: [PATCH] Store data in Application Support if running from Library --- src/Config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Config.py b/src/Config.py index 4e26aa2d..420343f5 100644 --- a/src/Config.py +++ b/src/Config.py @@ -10,7 +10,7 @@ class Config(object): def __init__(self, argv): self.version = "0.5.1" - self.rev = 1839 + self.rev = 1838 self.argv = argv self.action = None self.config_file = "zeronet.conf" @@ -65,7 +65,7 @@ class Config(object): if this_file.endswith("/Contents/Resources/core/src/Config.py"): # Running as ZeroNet.app - if this_file.startswith("/Application") or this_file.startswith("/private"): + if this_file.startswith("/Application") or this_file.startswith("/private") or this_file.startswith(os.path.expanduser("~/Library")): # Runnig from non-writeable directory, put data to Application Support start_dir = os.path.expanduser("~/Library/Application Support/ZeroNet").decode(sys.getfilesystemencoding()) else: