diff --git a/src/server/kiwix-serve.cpp b/src/server/kiwix-serve.cpp index 6150a10..d2fd3f2 100644 --- a/src/server/kiwix-serve.cpp +++ b/src/server/kiwix-serve.cpp @@ -1072,7 +1072,10 @@ int main(int argc, char** argv) } } if (!indexPath.empty()) { - manager.setBookIndex(library.getBooksIds()[0], indexPath); + if (isRelativePath(indexPath)) { + indexPath = computeAbsolutePath(indexPath, getCurrentDirectory()); + } + library.getBookById(library.getBooksIds()[0]).setIndexPath(indexPath); } }