You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`provider.rs`| Provider detection and enrichment: `Provider` enum (19 variants), `detect_provider()`, `provider_suggestion()`, `enrich_with_provider()`. Re-exported via `friendly_error.rs`. |
15
16
|`manager.rs`|`VolumeManager` — thread-safe `RwLock<HashMap>` registry; supports a default volume |
16
17
|`local_posix.rs`|`LocalPosixVolume` — real filesystem; delegates listing to `file_system::listing`, indexing to `indexing::scanner`, watching to `indexing::watcher` (FSEvents), copy scanning via `walkdir`. Uses `libc::statvfs` FFI for space info. |
17
18
|`mtp.rs`|`MtpVolume` — MTP device storage; synchronous `Volume` trait bridged to async MTP calls via `tokio::runtime::Handle::block_on`. Gated with `#[cfg(any(target_os = "macos", target_os = "linux"))]`. |
@@ -93,12 +94,14 @@ collapsible "Technical details" section, never hidden but never in your face eit
93
94
94
95
### Architecture
95
96
96
-
Two-layer mapping, both in this file:
97
+
Two-layer mapping across two files:
97
98
98
-
1.**`friendly_error_from_volume_error(err, path)`** — maps `VolumeError` variants and macOS errno codes (37 codes) to a
99
-
`FriendlyError` with category (Transient/NeedsAction/Serious), title, explanation, suggestion, and raw detail.
100
-
2.**`enrich_with_provider(error, path)`** — detects 19 cloud/mount providers from path patterns and `statfs` filesystem
101
-
type, then overwrites the suggestion with provider-specific advice.
99
+
1.**`friendly_error_from_volume_error(err, path)`** (`friendly_error.rs`) — maps `VolumeError` variants and macOS errno
100
+
codes (37 codes) to a `FriendlyError` with category (Transient/NeedsAction/Serious), title, explanation, suggestion,
101
+
and raw detail.
102
+
2.**`enrich_with_provider(error, path)`** (`provider.rs`, re-exported from `friendly_error.rs`) — detects 19
103
+
cloud/mount providers from path patterns and `statfs` filesystem type, then overwrites the suggestion with
104
+
provider-specific advice.
102
105
103
106
The frontend receives the fully-baked `FriendlyError` struct via the `listing-error` Tauri event and renders it with
104
107
category-based visual styling. The frontend never sees errno codes or does OS-specific logic.
0 commit comments