From 4fbf78164a39eef38737aa3d8b86f894ad89dd93 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Sun, 4 Sep 2011 13:07:04 +0000 Subject: [PATCH] + fix a bug with index relative paths --- src/common/kiwix/manager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/kiwix/manager.cpp b/src/common/kiwix/manager.cpp index db69539a8..aba8df98a 100644 --- a/src/common/kiwix/manager.cpp +++ b/src/common/kiwix/manager.cpp @@ -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()) {