Sidebar saving ignore unfinished files
This commit is contained in:
parent
10772a704e
commit
c2de26f557
2 changed files with 2 additions and 2 deletions
|
@ -330,7 +330,7 @@ class Sidebar extends Class
|
|||
data["title"] = $("#settings-title").val()
|
||||
data["description"] = $("#settings-description").val()
|
||||
json_raw = unescape(encodeURIComponent(JSON.stringify(data, undefined, '\t')))
|
||||
wrapper.ws.cmd "fileWrite", ["content.json", btoa(json_raw)], (res) =>
|
||||
wrapper.ws.cmd "fileWrite", ["content.json", btoa(json_raw), true], (res) =>
|
||||
if res != "ok" # fileWrite failed
|
||||
wrapper.notifications.add "file-write", "error", "File write error: #{res}"
|
||||
else
|
||||
|
|
|
@ -569,7 +569,7 @@ window.initScrollable = function () {
|
|||
data["title"] = $("#settings-title").val();
|
||||
data["description"] = $("#settings-description").val();
|
||||
json_raw = unescape(encodeURIComponent(JSON.stringify(data, void 0, '\t')));
|
||||
return wrapper.ws.cmd("fileWrite", ["content.json", btoa(json_raw)], function(res) {
|
||||
return wrapper.ws.cmd("fileWrite", ["content.json", btoa(json_raw), true], function(res) {
|
||||
if (res !== "ok") {
|
||||
return wrapper.notifications.add("file-write", "error", "File write error: " + res);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue