Change kiwix::fileExists to kiwix::fileReadable

pull/517/head
Nikhil Tanwar 4 years ago committed by Emmanuel Engelhart
parent b974e121b4
commit 74d3bffde0

@ -86,7 +86,7 @@ string loadCustomTemplate (string customIndexPath) {
customIndexPath = kiwix::isRelativePath(customIndexPath) ?
kiwix::computeAbsolutePath(kiwix::getCurrentDirectory(), customIndexPath) :
customIndexPath;
if (!kiwix::fileExists(customIndexPath)) {
if (!kiwix::fileReadable(customIndexPath)) {
throw runtime_error("No such file exist (or file is not readable) " + customIndexPath);
}
if (kiwix::getMimeTypeForFile(customIndexPath) != "text/html") {

Loading…
Cancel
Save