From 50be3cb45010017b614662898676b11f0b6940a4 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sat, 13 Apr 2024 11:13:57 +0200 Subject: [PATCH] Fix server crashes with .dirimages --- svr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svr.js b/svr.js index eee22b2..763dcf9 100644 --- a/svr.js +++ b/svr.js @@ -3528,7 +3528,7 @@ if (!cluster.isPrimary) { } // Check if index file exists - if (req.url == "/" || stats.isDirectory()) { + if (!dirImagesMissing && (req.url == "/" || stats.isDirectory())) { fs.stat((readFrom + "/index.html").replace(/\/+/g, "/"), function (e, s) { if (e || !s.isFile()) { fs.stat((readFrom + "/index.htm").replace(/\/+/g, "/"), function (e, s) {