mirror of https://github.com/kiwix/libkiwix.git
+ fix a bug with index relative paths
This commit is contained in:
parent
e06af8e68f
commit
4fbf78164a
|
@ -62,16 +62,16 @@ namespace kiwix {
|
|||
book.faviconMimeType = bookNode.attribute("faviconMimeType").value();
|
||||
|
||||
/* Compute absolute paths if relative one are used */
|
||||
if (!book.path.empty() && isRelativePath(book.path))
|
||||
if (isRelativePath(book.path))
|
||||
book.pathAbsolute = computeAbsolutePath(libraryPath, book.path);
|
||||
else
|
||||
book.pathAbsolute = book.path;
|
||||
|
||||
if (book.indexPath.empty() && isRelativePath(book.indexPath))
|
||||
|
||||
if (isRelativePath(book.indexPath))
|
||||
book.indexPathAbsolute = computeAbsolutePath(libraryPath, book.indexPath);
|
||||
else
|
||||
book.indexPathAbsolute = book.indexPath;
|
||||
|
||||
|
||||
/* Update the book properties with the new importer */
|
||||
if (libraryVersion.empty() || atoi(libraryVersion.c_str()) < atoi(KIWIX_LIBRARY_VERSION)) {
|
||||
if (!book.path.empty()) {
|
||||
|
|
Loading…
Reference in New Issue