Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
Updated dependencies to latest versions
When daemon.g is edited, DWC tries to rename it to daemon.g.bak before replacing it
err result from rr_move is ignored if the action is supposed to be enforced
  • Loading branch information
chrishamm committed Dec 14, 2023
1 parent d064228 commit bba9611
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 27 deletions.
50 changes: 25 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"sass": "~1.32",
"sass-loader": "^13.3.2",
"semver": "^7.5.4",
"simple-keyboard": "^3.7.34",
"simple-keyboard": "^3.7.35",
"stylus": "^0.59.0",
"stylus-loader": "^7.1.3",
"turbo-crc32": "^1.0.1",
Expand Down
4 changes: 4 additions & 0 deletions src/components/dialogs/FileEditDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ export default Vue.extend({
this.close(true);
try {
if (this.filename.endsWith("/daemon.g")) {
// daemon.g may be still open and running at this time, move it first
await store.dispatch("machine/move", { from: this.filename, to: this.filename + ".bak", force: true });
}
await store.dispatch("machine/upload", { filename: this.filename, content });
this.$emit("editComplete", this.filename);
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/store/machine/connector/PollConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ export default class PollConnector extends BaseConnector {
deleteexisting: force ? "yes" : "no"
}, "json", null, this.requestTimeout, from);

if (response.err !== 0) {
if (!force && response.err !== 0) {
throw new OperationFailedError(`err ${response.err}`);
}
}
Expand Down

0 comments on commit bba9611

Please sign in to comment.