Fix calls to os.path.expanduser with unicode strings.
expanduser does not handle unicode strings correctly, tries to decode using ASCII instead of FS encoding. Only workaround is to pass bytestrings
This commit is contained in:
parent
1961997d20
commit
a2c9093ee4
@ -715,7 +715,7 @@ class MCEditApp(QtGui.QApplication):
|
||||
NotImplementedYet()
|
||||
|
||||
def chooseOpenWorld(self):
|
||||
startingDir = Settings().value("open_world_dialog/starting_dir", os.path.expanduser("~"))
|
||||
startingDir = Settings().value("open_world_dialog/starting_dir", os.path.expanduser(b"~"))
|
||||
result = QtGui.QFileDialog.getOpenFileName(self.mainWindow, self.tr("Open World, Level or Schematic"),
|
||||
startingDir,
|
||||
"All files (*.*)")
|
||||
|
@ -61,7 +61,7 @@ def setup_logging():
|
||||
|
||||
if sys.platform == "darwin":
|
||||
log_debug("OS X found.")
|
||||
logfile = os.path.expanduser("~/Library/Logs/" + logfilename)
|
||||
logfile = os.path.expanduser(b"~/Library/Logs/" + logfilename)
|
||||
else:
|
||||
logfile = abslogfile
|
||||
else:
|
||||
|
Reference in New Issue
Block a user