mirror of https://github.com/kiwix/libkiwix.git
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…
Reference in New Issue