Fix the issues with non-ASCII characters in path on Windows #1613

Open
g1itch wants to merge 4 commits from g1itch/windows into v0.6
Showing only changes of commit 8798f2fbf5 - Show all commits

View File

@ -54,6 +54,11 @@ def lookupAppdataFolder():
dataFolder = os.path.join(
os.environ['APPDATA'], APPNAME
).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:
try:
dataFolder = os.path.join(os.environ['XDG_CONFIG_HOME'], APPNAME)