From b760c1d444fee49d8fbe6571d462c093b5b02bb6 Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Sun, 20 Oct 2013 19:26:39 -0700 Subject: [PATCH] RLGWebD: inprogress dirs have moved --- rlgwebd.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rlgwebd.js b/rlgwebd.js index 1647be7..8c5c119 100755 --- a/rlgwebd.js +++ b/rlgwebd.js @@ -127,7 +127,7 @@ function TermSession(game, lkey, dims, handlers) { 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 @@ function wsStart(wsReq) { * 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 @@ function stopgame(res, formdata) { 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);