From 30900ebfb5d3162172ad9fd79ddbfa9cbe430def Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 27 Jun 2022 15:04:44 +0200 Subject: [PATCH] Skip evlauating special dist (like ., ..) in FileCache. --- modules/web/file_cache.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/web/file_cache.cpp b/modules/web/file_cache.cpp index 8a75eaf78..bedd7683a 100644 --- a/modules/web/file_cache.cpp +++ b/modules/web/file_cache.cpp @@ -50,6 +50,11 @@ void FileCache::wwwroot_evaluate_dir(const String &path, const bool should_exist String f = da->get_next(); while (f != String()) { + if (f == "." || f == "..") { + f = da->get_next(); + continue; + } + if (!da->current_is_dir()) { String np = path + "/" + f; np = np.substr(wwwroot.size(), np.size() - wwwroot.size());