From 732d7c999aa968456f819cb83ef6d978992b8a19 Mon Sep 17 00:00:00 2001 From: "Grant T. Olson" Date: Mon, 26 Aug 2013 08:44:15 -0400 Subject: [PATCH] Allow specification of alternate settings dir via BITMESSAGE_HOME --- src/shared.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared.py b/src/shared.py index fb19da26..e39121d2 100644 --- a/src/shared.py +++ b/src/shared.py @@ -126,7 +126,11 @@ def assembleVersionMessage(remoteHost, remotePort, myStreamNumber): def lookupAppdataFolder(): APPNAME = "PyBitmessage" from os import path, environ - if sys.platform == 'darwin': + if "BITMESSAGE_HOME" in environ: + dataFolder = environ["BITMESSAGE_HOME"] + if dataFolder[-1] not in [os.path.sep, os.path.altsep]: + dataFolder += os.path.sep + elif sys.platform == 'darwin': if "HOME" in environ: dataFolder = path.join(os.environ["HOME"], "Library/Application Support/", APPNAME) + '/' else: -- 2.45.1