fix(storage): canonicalize retained Windows virtual data roots without reopening SQLite

This commit is contained in:
Agent Workbench Dev
2026-10-31 14:54:58 +08:00
parent dd31eefc77
commit 85e0f0e5ce
3 changed files with 46 additions and 0 deletions
+4
View File
@@ -94,6 +94,10 @@ export class Store extends EventEmitter {
}
ensureStorage(options = {}) {
// A retained pre-desktop Store may still name an MSIX-virtualized LocalAppData
// directory. Bind new path-scoped services to that same physical directory,
// including when SQLite is already open; do not reopen or move its data.
this.directory = fs.realpathSync.native(this.directory);
if (this.storage?.database) {
const missing = CORE_KINDS.filter(kind => !this.core?.[kind]);
if (missing.length) {