Try using ActiveState appdirs on Windows
This commit is contained in:
parent
6570a06dc7
commit
8798f2fbf5
|
@ -54,6 +54,11 @@ def lookupAppdataFolder():
|
||||||
dataFolder = os.path.join(
|
dataFolder = os.path.join(
|
||||||
os.environ['APPDATA'], APPNAME
|
os.environ['APPDATA'], APPNAME
|
||||||
).decode(sys.getfilesystemencoding(), 'ignore') + os.path.sep
|
).decode(sys.getfilesystemencoding(), 'ignore') + os.path.sep
|
||||||
|
try:
|
||||||
|
os.path.isdir(dataFolder)
|
||||||
|
except WindowsError:
|
||||||
|
from appdirs import user_data_dir
|
||||||
|
dataFolder = user_data_dir('PyBitmessage', False)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
dataFolder = os.path.join(os.environ['XDG_CONFIG_HOME'], APPNAME)
|
dataFolder = os.path.join(os.environ['XDG_CONFIG_HOME'], APPNAME)
|
||||||
|
|
Reference in New Issue
Block a user