Make it work under Windows
This commit is contained in:
parent
c3245f287a
commit
8edef21682
1 changed files with 1 additions and 2 deletions
3
index.js
3
index.js
|
@ -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" ? "\\" : "/");
|
||||||
|
|
Loading…
Reference in a new issue