File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ def __init__(self):
28
28
29
29
def run (self ): # pylint: disable=too-many-locals, too-many-branches, too-many-statements
30
30
"""Process SQL queries from `.helper_sql.sqlSubmitQueue`"""
31
- self .conn = sqlite3 .connect (state .appdata + 'messages.dat' )
31
+ self .conn = sqlite3 .connect (
32
+ os .path .join (state .appdata , 'messages.dat' ))
32
33
self .conn .text_factory = str
33
34
self .cur = self .conn .cursor ()
34
35
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ def lookupExeFolder():
23
23
# targetdir/Bitmessage.app/Contents/MacOS/Bitmessage
24
24
os .path .dirname (sys .executable ).split (os .path .sep )[0 ] + os .path .sep
25
25
if frozen == "macosx_app" else
26
- os .path .dirname (sys .executable ) + os .path .sep )
26
+ os .path .dirname (sys .executable ).decode (
27
+ sys .getfilesystemencoding (), 'ignore' ) + os .path .sep )
27
28
elif __file__ :
28
29
exeFolder = os .path .dirname (__file__ ) + os .path .sep
29
30
else :
@@ -49,11 +50,10 @@ def lookupAppdataFolder():
49
50
sys .exit (
50
51
'Could not find home folder, please report this message'
51
52
' and your OS X version to the BitMessage Github.' )
52
- elif 'win32' in sys .platform or 'win64' in sys . platform :
53
+ elif sys .platform . startswith ( 'win' ) :
53
54
dataFolder = os .path .join (
54
- os .environ ['APPDATA' ].decode (
55
- sys .getfilesystemencoding (), 'ignore' ), APPNAME
56
- ) + os .path .sep
55
+ os .environ ['APPDATA' ], APPNAME
56
+ ).decode (sys .getfilesystemencoding (), 'ignore' ) + os .path .sep
57
57
else :
58
58
try :
59
59
dataFolder = os .path .join (os .environ ['XDG_CONFIG_HOME' ], APPNAME )
You can’t perform that action at this time.
0 commit comments