mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-25 19:13:21 +02:00
Comic Input: Fix handling of some CBZ files that have wrongly encoded non ASCII filenames on windows. Fixes #763280 (Conversion from CBR/CBZ fails if files not in root)
This commit is contained in:
parent
99ed3e4477
commit
48d431f85f
1 changed files with 5 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
from calibre.customize.conversion import InputFormatPlugin, OptionRecommendation
|
||||
from calibre import extract, CurrentDir, prints
|
||||
from calibre.constants import filesystem_encoding
|
||||
from calibre.ptempfile import PersistentTemporaryDirectory
|
||||
from calibre.utils.ipc.server import Server
|
||||
from calibre.utils.ipc.job import ParallelJob
|
||||
|
|
@ -21,6 +22,10 @@ def extract_comic(path_to_comic_file):
|
|||
Un-archive the comic file.
|
||||
'''
|
||||
tdir = PersistentTemporaryDirectory(suffix='_comic_extract')
|
||||
if not isinstance(tdir, unicode):
|
||||
# Needed in case the zip file has wrongly encoded unicode file/dir
|
||||
# names
|
||||
tdir = tdir.decode(filesystem_encoding)
|
||||
extract(path_to_comic_file, tdir)
|
||||
return tdir
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue