mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-26 19:09:32 -04:00
Better kiwix-serve default loading if no welcome page is defined in ZIM (ID: 3417227)
This commit is contained in:
1 parent
72b8527654
commit
1e9bfa168d
1 file changed
+4
@@ -124,6 +124,10 @@ namespace kiwix {
|
||||
if (this->zimFileHandler->getFileheader().hasMainPage()) {
|
||||
zim::Article article = zimFileHandler->getArticle(this->zimFileHandler->getFileheader().getMainPage());
|
||||
url = article.getLongUrl();
|
||||
|
||||
if (url.empty()) {
|
||||
url = getFirstPageUrl();
|
||||
}
|
||||
}
|
||||
|
||||
return url;
|
||||
|
||||
Reference in new issue
Block a user