From 8652fef620b9f58b7d606b10b51a4d464bc22b51 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Wed, 20 Jul 2022 20:35:51 +0300 Subject: [PATCH] Fix trying to decode str on windows --- src/paths.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/paths.py b/src/paths.py index e2f8c97e..8cde08af 100644 --- a/src/paths.py +++ b/src/paths.py @@ -49,11 +49,8 @@ def lookupAppdataFolder(): sys.exit( 'Could not find home folder, please report this message' ' and your OS X version to the BitMessage Github.') - elif 'win32' in sys.platform or 'win64' in sys.platform: - dataFolder = os.path.join( - os.environ['APPDATA'].decode( - sys.getfilesystemencoding(), 'ignore'), APPNAME - ) + os.path.sep + elif sys.platform.startswith('win'): + dataFolder = os.path.join(os.environ['APPDATA'], APPNAME) + os.path.sep else: try: dataFolder = os.path.join(os.environ['XDG_CONFIG_HOME'], APPNAME)