mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
IGN:fixes to lit2oeb
This commit is contained in:
parent
34eeb12422
commit
aa6cba1e8e
@ -587,11 +587,12 @@ class LitReader(object):
|
|||||||
shared = mlist[0].path
|
shared = mlist[0].path
|
||||||
for item in mlist[1:]:
|
for item in mlist[1:]:
|
||||||
path = item.path
|
path = item.path
|
||||||
while not path.startswith(shared):
|
while shared and not path.startswith(shared):
|
||||||
shared = shared[:-1]
|
try: shared = shared[:shared.rindex("/", 0, -2) + 1]
|
||||||
if shared == '':
|
except ValueError: shared = None
|
||||||
|
if not shared:
|
||||||
break
|
break
|
||||||
else:
|
if shared:
|
||||||
slen = len(shared)
|
slen = len(shared)
|
||||||
for item in mlist:
|
for item in mlist:
|
||||||
item.path = item.path[slen:]
|
item.path = item.path[slen:]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user