mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-09-22 11:45:45 -04:00
Better kiwix-serve default loading if no welcome page is defined in ZIM (ID: 3417227)
This commit is contained in:
parent
72b8527654
commit
1e9bfa168d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user