Seems to fix the case where the meta is not in the root of the epub

--HG--
extra : rebase_source : 29d9f279a5ec3debcb67c5c11c82cd268fad4931
This commit is contained in:
Sébastien Lucas 2013-08-30 22:07:04 +02:00
parent 1f65d1eb65
commit e6d18cfbe4

View file

@ -171,6 +171,12 @@ class EPub {
error_log ("Unable to find " . $path);
return false;
}
$ref = dirname('/'.$this->meta);
$ref = ltrim($ref,'\\');
$ref = ltrim($ref,'/');
if (strlen ($ref) > 0) {
$path = str_replace ($ref . "/", "", $path);
}
return str_replace ("/", "-SLASH-", $path);
}