mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Better kiwix-serve default loading if no welcome page is defined in ZIM (ID: 3417227)
This commit is contained in:
@ -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