mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix #8050 (Error converting CBZ files with Japanese filenames to EPUB)
This commit is contained in:
parent
21adeb65bd
commit
7bca2bc90c
@ -1087,7 +1087,9 @@ class ZipFile:
|
|||||||
with open(targetpath, 'wb') as target:
|
with open(targetpath, 'wb') as target:
|
||||||
shutil.copyfileobj(source, target)
|
shutil.copyfileobj(source, target)
|
||||||
except:
|
except:
|
||||||
targetpath = sanitize_file_name(targetpath)
|
components = list(os.path.split(targetpath))
|
||||||
|
components[-1] = sanitize_file_name(components[-1])
|
||||||
|
targetpath = os.sep.join(components)
|
||||||
with open(targetpath, 'wb') as target:
|
with open(targetpath, 'wb') as target:
|
||||||
shutil.copyfileobj(source, target)
|
shutil.copyfileobj(source, target)
|
||||||
self.extract_mapping[member.filename] = targetpath
|
self.extract_mapping[member.filename] = targetpath
|
||||||
|
Loading…
x
Reference in New Issue
Block a user