RLGWebD: inprogress dirs have moved
This commit is contained in:
parent
49640d131e
commit
b760c1d444
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue