Versions 16 to 17
new file, 32 lines
1+// Where abso keeps its state (the rename from avcs). A new folder keeps it in .abso/ and the user's in ~/.abso/.
2+// Folders and machines from before keep working on .avcs/ and ~/.avcs/, untouched: a folder is never half-moved,
3+// so an older client or installed mod still finds it. A later `abso migrate` moves a folder once its mods are updated.
5+
8+
12+
13+/** A folder's state folder: whichever has a config.json (.abso first), else whichever exists, else .abso for a folder not made yet. */
15+ for (const name of STATE_DIRS) if (existsSync(join(root, name, "config.json"))) return join(root, name);
19+
20+/** A file under the user's home to read: ~/.abso/<parts>, else the old ~/.avcs/<parts> when only that exists, else the new place. */
28+
29+/** Where to write a file under the user's home: always the new place. The old file is left as it is, for older clients and mods. */
- MCP
- compare on this site's /mcp
- CLI
- abso diff 16 17 client/src/state-dir.ts --json
- JSON
- /christopher/abso-core/compare/16..17?file=client%2Fsrc%2Fstate-dir.ts&format=json