Skip to content

Commit

Permalink
Allow running from usr/share/zeronet
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd authored May 7, 2017
1 parent db744f5 commit b8fb53b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ def createArguments(self):
config_file = start_dir + "/zeronet.conf"
data_dir = start_dir + "/data"
log_dir = start_dir + "/log"
elif this_file.endswith("usr/share/zeronet/src/Config.py"):
# Running from non-writeable location, e.g., AppImage
start_dir = os.path.expanduser("~/ZeroNet").decode(sys.getfilesystemencoding())
config_file = start_dir + "/zeronet.conf"
data_dir = start_dir + "/data"
log_dir = start_dir + "/log"
else:
config_file = "zeronet.conf"
data_dir = "data"
Expand Down

0 comments on commit b8fb53b

Please sign in to comment.