Commit 8488795
fix: resolve android read-only file system error on sync
Android 10+ (API 29+) enforces Scoped Storage via the Storage Access Framework (SAF),
meaning that standard `std::fs` operations cannot write to user-selected virtual URIs,
causing a `Read-only file system (os error 30)` panic when the backend tried to initialize
the hidden `.sync` directory inside the workspace.
- Relocated the Automerge `.am` metadata files into the Tauri application's native,
read-write enabled config directory (`app_config_dir()`).
- Added MD5 hashing of the workspace path to ensure different workspace trees
get their own isolated sub-folder of sync states to prevent cross-workspace collisions.
Co-authored-by: Keshav-writes-code <95571677+Keshav-writes-code@users.noreply.github.com>1 parent e50bda3 commit 8488795
4 files changed
Lines changed: 18 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
27 | | - | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments