Fix #2142345 [Converting ODT to EPUB jpeg images indicates not found](https://bugs.launchpad.net/calibre/+bug/2142345)

This commit is contained in:
Kovid Goyal 2026-02-21 11:59:23 +05:30
parent 1be720c429
commit 4eabb38427
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -34,7 +34,7 @@ class Extract(ODF2XHTML):
for name in zf.namelist():
if name.startswith('Pictures') and name not in {'Pictures', 'Pictures/'}:
dest = os.path.abspath(os.path.join(base, name))
if os.path.commonprefix([base, dest]) != dest:
if os.path.commonprefix([base, dest]) != base:
continue
data = zf.read(name)
with open(dest, 'wb') as f: