Mercurial > hg > rlgwebd
diff rlgwebd.js @ 142:c4304f08e35b
RLGWebD: inprogress dirs have moved
author | John "Elwin" Edwards |
---|---|
date | Sun, 20 Oct 2013 19:26:39 -0700 |
parents | 1a156a7746a7 |
children | 81a8e7aa4687 |
line wrap: on
line diff
--- a/rlgwebd.js Wed Aug 14 08:04:36 2013 -0700 +++ b/rlgwebd.js Sun Oct 20 19:26:39 2013 -0700 @@ -127,7 +127,7 @@ gamemux.emit('begin', this.sessid, this.pname, this.game.uname); /* Set up the lockfile and ttyrec */ var ts = timestamp(); - var progressdir = "/dgldir/inprogress-" + this.game.uname; + var progressdir = path.join("/dgldir/inprogress", this.game.uname); this.lock = path.join(progressdir, this.pname + ":node:" + ts + ".ttyrec"); var lmsg = this.term.pid.toString() + '\n' + this.h + '\n' + this.w + '\n'; fs.writeFile(this.lock, lmsg, "utf8"); @@ -482,7 +482,7 @@ * has a saved game. Maybe someday they will provide information on * the game. */ function checkprogress(user, game, callback, args) { - var progressdir = "/dgldir/inprogress-" + game.uname; + var progressdir = path.join("/dgldir/inprogress", game.uname); fs.readdir(progressdir, function(err, files) { if (err) { args.unshift(err, null); @@ -902,7 +902,7 @@ sendError(res, 7); return; } - var fullfile = path.join("/dgldir/inprogress-" + gname, fname); + var fullfile = path.join("/dgldir/inprogress", gname, fname); fs.readFile(fullfile, "utf8", function(err, fdata) { if (err) { sendError(res, 7);