Possible temporary fix for non-ascii usernames
This commit is contained in:
parent
c891a00d68
commit
9e4b1a4d32
1 changed files with 12 additions and 6 deletions
|
@ -27,9 +27,15 @@ def osVer():
|
|||
return " ".join(platform.linux_distribution())
|
||||
|
||||
def getDataDir():
|
||||
# Temporary fix for non-ascii usernames
|
||||
# If username has non-ascii characters, just store userdata
|
||||
# in the Pesterchum install directory (like before)
|
||||
try:
|
||||
if isOSX():
|
||||
return os.path.join(unicode(QDesktopServices.storageLocation(QDesktopServices.DataLocation)), "Pesterchum/")
|
||||
elif isLinux():
|
||||
return os.path.join(unicode(QDesktopServices.storageLocation(QDesktopServices.HomeLocation)), ".pesterchum/")
|
||||
else:
|
||||
return os.path.join(unicode(QDesktopServices.storageLocation(QDesktopServices.DataLocation)), "pesterchum/")
|
||||
except UnicodeDecodeError:
|
||||
return ''
|
||||
|
|
Loading…
Reference in a new issue