mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-03-06 15:24:49 +01:00
Fix #7288 (calibre cannot work correctly if the temporary path contain non-ASCII characters)
This commit is contained in:
parent
44c3ba638e
commit
50151bca5e
1 changed files with 5 additions and 1 deletions
|
|
@ -14,7 +14,7 @@
|
|||
from calibre.ptempfile import PersistentTemporaryDirectory
|
||||
from calibre.utils.date import parse_date
|
||||
from calibre.utils.zipfile import ZipFile
|
||||
from calibre import extract, walk
|
||||
from calibre import extract, walk, isbytestring, filesystem_encoding
|
||||
from calibre.constants import __version__
|
||||
|
||||
DEBUG_README=u'''
|
||||
|
|
@ -77,6 +77,10 @@ def __init__(self, input, output, log, report_progress=DummyReporter(),
|
|||
:param input: Path to input file.
|
||||
:param output: Path to output file/directory
|
||||
'''
|
||||
if isbytestring(input):
|
||||
input = input.decode(filesystem_encoding)
|
||||
if isbytestring(output):
|
||||
output = output.decode(filesystem_encoding)
|
||||
self.original_input_arg = input
|
||||
self.input = os.path.abspath(input)
|
||||
self.output = os.path.abspath(output)
|
||||
|
|
|
|||
Loading…
Reference in a new issue