1
0
Fork 0
forked from svrjs/svrjs

Fixed checkEXT again

This commit is contained in:
Dorian Niemiec 2023-08-19 23:18:52 +02:00
parent bfcc88a4dd
commit e6c1194086

2
svr.js
View file

@ -3760,7 +3760,7 @@ if (!cluster.isPrimary) {
getStatsForAllFiles(list, "." + decodeURIComponent(href), function (filelist) { getStatsForAllFiles(list, "." + decodeURIComponent(href), function (filelist) {
// Function to check file extension // Function to check file extension
function checkEXT(filename, ext) { 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 = []; var directoryListingRows = [];