From 74d3bffde090b5868db548376d433b68be503bf1 Mon Sep 17 00:00:00 2001 From: Nikhil Tanwar <2002nikhiltanwar@gmail.com> Date: Mon, 3 Jan 2022 22:35:17 +0530 Subject: [PATCH] Change kiwix::fileExists to kiwix::fileReadable --- src/server/kiwix-serve.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/kiwix-serve.cpp b/src/server/kiwix-serve.cpp index df813b0..26df21d 100644 --- a/src/server/kiwix-serve.cpp +++ b/src/server/kiwix-serve.cpp @@ -86,8 +86,8 @@ string loadCustomTemplate (string customIndexPath) { customIndexPath = kiwix::isRelativePath(customIndexPath) ? kiwix::computeAbsolutePath(kiwix::getCurrentDirectory(), customIndexPath) : customIndexPath; - if (!kiwix::fileExists(customIndexPath)) { - throw runtime_error("No such file exist (or file is not readable)" + customIndexPath); + if (!kiwix::fileReadable(customIndexPath)) { + throw runtime_error("No such file exist (or file is not readable) " + customIndexPath); } if (kiwix::getMimeTypeForFile(customIndexPath) != "text/html") { throw runtime_error("Invalid File Mime Type " + kiwix::getMimeTypeForFile(customIndexPath));