aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-27 08:31:52 +0100
committerAgando <roduccomm@gmail.com>2026-10-27 08:31:52 +0100
commit78149467b099465b9d0396bdd3916ba8507917ba (patch)
tree15db0468813c6ef5c973ba425b57d030b98ece65
parent258b32cd89135cb0948f9df7eca164ae4146a73d (diff)
fix(newos4): checkpoint() returns resolved name (auto)
Task 1 of plan 2026-10-27_061724-newos4-checkpoint-name-mismatch.md. virtual-fs.js checkpoint(name) generated an ISO name when none was given but returned bare `true`, so callers could not know which name the snapshot was written under. It now returns the resolved name (string). Prune (max 3) and saveToStorage() behaviour unchanged. Verification: $ node --check modules/core/virtual-fs.js SYNTAX OK $ node modules/test/test-vfs-checkpoint.js test-vfs-checkpoint: 9 passed, 1 FAILED (remaining FAIL was the module-system display path, fixed in the next commit)
-rw-r--r--modules/core/virtual-fs.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/core/virtual-fs.js b/modules/core/virtual-fs.js
index e639cba..09b3548 100644
--- a/modules/core/virtual-fs.js
+++ b/modules/core/virtual-fs.js
@@ -966,7 +966,7 @@ class VirtualFileSystem {
const toDelete = sorted.slice(0, all.length - 3);
for (const old of toDelete) this.deleteCheckpoint(old);
}
- return true;
+ return name;
}
rollback(name) {
const raw = this.fsReadJSON('/_snapshots/checkpoint-' + name + '.json');