psiegman / epublib

a java library for reading and writing epub files
http://www.siegmann.nl/epublib
1.04k stars 313 forks source link

Resource full href #82

Open gterrono opened 9 years ago

gterrono commented 9 years ago

The hrefs on Resource objects doesn't seem to include the path to the directory that the html files, for instance, the href for a resource in one of my ebooks is 'chapter-1.xhtml', but, from the root directory of the epub, it can be found at 'OPS/chapter-1.xhtml'. Is there a way for me to programmatically find the 'OPS' part of that path?

Thanks!

iambmelt commented 9 years ago

@gterrono The path from the manifest should be relative to the manifest, not the root. That said, if you're unzipping & parsing the manifest, it seems like you should have this path already. Does that help at all?