IGN:fixes to lit2oeb

This commit is contained in:
Kovid Goyal 2008-07-21 13:37:26 -07:00
commit 34eeb12422

View File

@ -334,14 +334,9 @@ class ManifestItem(object):
self.root = root
self.state = state
# Some paths in Fictionwise "multiformat" LIT files contain '..' (!?)
nodes = original.split('/')
path = []
for node in nodes:
if node == '..':
if path: path.pop()
continue
path.append(node)
self.path = os.path.join(*path)
path = os.path.normpath(original).replace('\\', '/')
while path.startswith('../'): path = path[3:]
self.path = path
def __eq__(self, other):
if hasattr(other, 'internal'):