mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-08 16:25:22 +01: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
1 changed files with 2 additions and 1 deletions
|
|
@ -20,6 +20,7 @@
|
|||
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 @@ def setup_ui(self):
|
|||
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…
Reference in a new issue