Keep the browser profiles in Local AppData
The browser data moves from the roaming app data folder to the local app data folder before the engine starts. A failed rename falls back to a copy. The old folder stays when the copy fails or when the new folder exists.
This commit is contained in:
@@ -114,6 +114,7 @@ A new command needs an entry in `generate_handler!` in `lib.rs`, in the command
|
||||
| Workspace state: tab order, pins, bookmarks, templates, Project Management boards | `.runestone/` in the workspace |
|
||||
| Installed plugins and their settings | The app data folder. See [plugin storage](plugin-host.md#storage-and-recovery). |
|
||||
| Preferences: general settings, appearance, custom themes, display language | `settings.json` in the app config folder |
|
||||
| Browser profiles, bookmarks, history, browser settings, and Chromium caches | `browser/` in the local app data folder. On Windows, this is `%LOCALAPPDATA%\com.runestone.app\browser\`. See [Built-in browser runtime](#built-in-browser-runtime). |
|
||||
| Window layout and the open tabs of each workspace | The WebView storage (`localStorage`) of the app. RuneStone can lose these values without harm. |
|
||||
|
||||
#### The settings file
|
||||
@@ -292,6 +293,11 @@ The installer includes the staged engine from `src-tauri/browser-engine/`.
|
||||
|
||||
Each browser window gets a session token at startup. Native requests check that token, and cleanup revokes it.
|
||||
|
||||
The browser data is in the Tauri `app_local_data_dir()`. Releases up to 0.1.48 kept it in `app_data_dir()`, which roams on Windows.
|
||||
Before the engine starts, `src-tauri/src/browser.rs` moves an old `browser` folder to the new place. Across volumes, it copies the folder and then deletes the old one.
|
||||
If the new folder exists, the host uses it and leaves the old folder. If the move fails, the engine does not start, and the error names both folders.
|
||||
On macOS and Linux, the two folders are the same, so nothing moves.
|
||||
|
||||
## Development help
|
||||
|
||||
| Problem | Action |
|
||||
|
||||
Reference in New Issue
Block a user