pressbooks/pressbooks — pull request #13 by bdolor (2013-06-14 22:30:27+00:00)
Title: import images EPUB fix, special relative links

I came across an EPUB file that was producing #fixme errors on import, and consequently no images were uploaded. It had to do with the directory structure of the resources in the EPUB. HTML files and Images files were in separate directories. fetchAndSaveUniqueImage() was evaluating and handing off the image path to ZipArchive::getFromIndex based on a combination of the url [url] of the image and the directory name [dir]. Since the directory name [dir] is derived from the directory of the HTML file, ZipArchive was being pointed to a directory where the images are not located. See img_location below. I've added a try/catch block to deal with this.

![screen shot 2013-06-14 at 1 50 34 pm 1](https://f.cloud.github.com/assets/2048170/657073/811a11c2-d540-11e2-9885-8350deaf8b2e.png)