Switch to node v0.8.
In node v0.8, path.exists() has been moved to the fs module.
This commit is contained in:
parent
cf3388a566
commit
e3dd70ce08
2 changed files with 4 additions and 3 deletions
|
|
@ -360,7 +360,7 @@ function checksaved(user, game, callback, args) {
|
|||
var savedirc = game.uname + "save";
|
||||
var basename = String(dropToUID) + "-" + user + game.suffix;
|
||||
var savefile = path.join("/var/games/roguelike", savedirc, basename);
|
||||
path.exists(savefile, function (exist) {
|
||||
fs.exists(savefile, function (exist) {
|
||||
args.unshift(exist);
|
||||
callback.apply(null, args);
|
||||
});
|
||||
|
|
@ -745,7 +745,7 @@ function serveStatic(req, res, fname) {
|
|||
path.join(nname, "index.html"); /* it was a directory */
|
||||
var realname = path.join(serveStaticRoot, nname);
|
||||
var extension = path.extname(realname);
|
||||
path.exists(realname, function (exists) {
|
||||
fs.exists(realname, function (exists) {
|
||||
var resheaders = {};
|
||||
if (!exists || !extension || extension == ".html")
|
||||
resheaders["Content-Type"] = "text/html; charset=utf-8";
|
||||
|
|
@ -989,6 +989,7 @@ function shutdown () {
|
|||
httpServer.close();
|
||||
httpServer.removeAllListeners('request');
|
||||
ctlServer.close();
|
||||
fs.unlink(ctlsocket);
|
||||
tslog("Shutting down...");
|
||||
process.exit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue