aboutsummaryrefslogtreecommitdiff
path: root/modules/core
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
commit7b7d58e8cb1dcea131cb17450171cadb563eaa52 (patch)
treec630453f30289c821aabb9e3dcb59487c735d381 /modules/core
parent132185e96034fca3bd2fc95998dd778e9e22258b (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)
Diffstat (limited to 'modules/core')
-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');