Make it work under Windows

This commit is contained in:
Dorian Niemiec 2023-08-26 14:58:29 +02:00
parent 42f46c148a
commit 6168470048
2 changed files with 2 additions and 3 deletions

View file

@ -77,7 +77,6 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
"Server": "RedBrick/" + version "Server": "RedBrick/" + version
}); });
res.end("<html><head></head><body><h1>RedBrick Error!</h1><p>Reason: " + err.message + "</p></body></html>"); res.end("<html><head></head><body><h1>RedBrick Error!</h1><p>Reason: " + err.message + "</p></body></html>");
} else { } else {
callServerError(500, "RedBrick/" + version, err); callServerError(500, "RedBrick/" + version, err);
} }
@ -110,7 +109,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
res.end("<html><head></head><body><h1>RedBrick Error!</h1><p>Reason: " + ex.message + "</p></body></html>"); res.end("<html><head></head><body><h1>RedBrick Error!</h1><p>Reason: " + ex.message + "</p></body></html>");
return; return;
} }
args.push(fname); args.push(__dirname + "/../../../temp/" + tempID);
filename = args.shift(); filename = args.shift();
} else { } else {
filename = (process.cwd() + (os.platform() == "win32" ? "\\" + fname.replace(/\//g, "\\") : "/" + fname)).replace(os.platform() == "win32" ? /\\+/ : /\/+/, os.platform() == "win32" ? "\\" : "/"); filename = (process.cwd() + (os.platform() == "win32" ? "\\" + fname.replace(/\//g, "\\") : "/" + fname)).replace(os.platform() == "win32" ? /\\+/ : /\/+/, os.platform() == "win32" ? "\\" : "/");

View file

@ -1,4 +1,4 @@
{ {
"name": "DorianTech RedBrick CGI engine for SVR.JS", "name": "DorianTech RedBrick CGI engine for SVR.JS",
"version": "2.3.5" "version": "2.3.6"
} }