From e6c11940865ff74baa4fdda4d6668be7d2e89a2b Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sat, 19 Aug 2023 23:18:52 +0200 Subject: [PATCH] Fixed checkEXT again --- svr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svr.js b/svr.js index 0eed035..7eb6bf6 100644 --- a/svr.js +++ b/svr.js @@ -3760,7 +3760,7 @@ if (!cluster.isPrimary) { getStatsForAllFiles(list, "." + decodeURIComponent(href), function (filelist) { // Function to check file extension function checkEXT(filename, ext) { - return filename.match(new RegExp(ext.replace(/([.+*?^$()\[\]{}|\\])/,"\\$1") + "$","i")); + return filename.match(new RegExp("\\." + ext.replace(/^\./,"").replace(/([.+*?^$()\[\]{}|\\])/,"\\$1") + "$","i")); } var directoryListingRows = [];