From 8798f2fbf51d0c8161cf38a627cb0e21b2418da7 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Mon, 27 Apr 2020 18:56:35 +0300 Subject: [PATCH] Try using ActiveState appdirs on Windows --- src/paths.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/paths.py b/src/paths.py index 49e312a1..c162f0b3 100644 --- a/src/paths.py +++ b/src/paths.py @@ -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)