Decode windows HOME using the file system encoding
GTK requires to have string encoded in utf-8. issue4870 review16471002
This commit is contained in:
1 parent
3ecb999739
commit
7db7a67ec7
1 file changed
+2
-1
+2
-1
@@ -19,7 +19,8 @@ _ = gettext.gettext
|
||||
|
||||
def get_home_dir():
|
||||
if os.name == 'nt':
|
||||
return os.path.join(os.environ['HOMEDRIVE'], os.environ['HOMEPATH'])
|
||||
return os.path.join(os.environ['HOMEDRIVE'], os.environ['HOMEPATH']
|
||||
).decode(sys.getfilesystemencoding()).encode('utf-8')
|
||||
return os.environ['HOME']
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user