mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
E-book viewer: Fix print to pdf not working on some windows systems with non-ascii usernames and non-utf-8 system locales
This commit is contained in:
parent
c1cd424099
commit
b189c31fc4
@ -20,6 +20,7 @@ from calibre.gui2.widgets2 import Dialog
|
||||
from calibre.gui2.viewer.main import vprefs
|
||||
from calibre.utils.icu import numeric_sort_key
|
||||
from calibre.utils.ipc.simple_worker import start_pipe_worker
|
||||
from calibre.utils.filenames import expanduser
|
||||
|
||||
class PrintDialog(Dialog):
|
||||
|
||||
@ -38,7 +39,7 @@ class PrintDialog(Dialog):
|
||||
self.file_name = f = QLineEdit(self)
|
||||
val = dynamic.get(self.OUTPUT_NAME, None)
|
||||
if not val:
|
||||
val = os.path.expanduser('~')
|
||||
val = expanduser('~')
|
||||
else:
|
||||
val = os.path.dirname(val)
|
||||
f.setText(os.path.abspath(os.path.join(val, self.default_file_name)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user