Merge pull request #462 from Atheros1/master
Allow specification of alternate settings dir via BITMESSAGE_HOME
This commit is contained in:
commit
6f48d6738b
|
@ -131,7 +131,12 @@ def assembleVersionMessage(remoteHost, remotePort, myStreamNumber):
|
||||||
|
|
||||||
def lookupAppdataFolder():
|
def lookupAppdataFolder():
|
||||||
APPNAME = "PyBitmessage"
|
APPNAME = "PyBitmessage"
|
||||||
if sys.platform == 'darwin':
|
from os import path, environ
|
||||||
|
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:
|
if "HOME" in environ:
|
||||||
dataFolder = path.join(os.environ["HOME"], "Library/Application Support/", APPNAME) + '/'
|
dataFolder = path.join(os.environ["HOME"], "Library/Application Support/", APPNAME) + '/'
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user