This commit is contained in:
nightwing 2015-06-01 01:06:39 +04:00
commit 3f31ca57ed
2 changed files with 4 additions and 3 deletions

View file

@ -21,7 +21,7 @@ http.createServer(function(req, res) {
if (req.method == "PUT") {
if (!allowSave)
return error(res, 404, "Saving not allowed pass --allow-save to enable");
save(req, res, filename);
return save(req, res, filename);
}
fs.exists(filename, function(exists) {
@ -86,6 +86,7 @@ function save(req, res, filePath) {
}
res.statusCode = 200;
res.end("OK");
console.log("saved ", filePath);
});
}

View file

@ -126,8 +126,8 @@ function handleSaveResult(err, editor) {
return log(
"Write access to this file is disabled.\n"+
"To enable saving your changes to disk, clone the Ace repository\n"+
"and run the included web server with the --allow-write option\n"+
"`node static.js --allow-write` or `static.py --puttable=*`"
"and run the included web server with the --allow-save option\n"+
"`node static.js --allow-save` or `static.py --puttable=*`"
);
}
editor.session.getUndoManager().markClean();