# HG changeset patch # User John "Elwin" Edwards # Date 1382322399 25200 # Node ID c4304f08e35b1a9989d91e2d6fbe0734ffcb1fe7 # Parent 1a156a7746a73fd108c9a34eda3fe1c04d84d11f RLGWebD: inprogress dirs have moved diff -r 1a156a7746a7 -r c4304f08e35b rlgwebd.js --- 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);