Commit 531bb9b
committed
Async Volume trait: eliminate nested-runtime panics
- `Volume` trait: 20 I/O methods now return `Pin<Box<dyn Future + Send>>`, 13 accessors stay sync
- `VolumeReadStream::next_chunk` is async — MTP downloads use direct `.await`, no channel bridge
- `LocalPosixVolume`: all I/O methods wrap in `spawn_blocking` (blocking syscalls stay off the runtime)
- `MtpVolume`: all `Handle::block_on` removed, direct `.await` on `MtpConnectionManager`
- `SmbVolume`: all `block_on`/`with_smb` bridges removed, `std::sync::Mutex` → `tokio::sync::Mutex`
- `InMemoryVolume`: trivially async (no I/O)
- Copy/move/delete pipelines: `spawn_blocking` removed, functions are `async fn`
- Conflict resolution: `Condvar` → `tokio::sync::oneshot` channel per conflict
- Consolidated `export_to_local` + `import_from_local` — progress callback is always part of the signature
- `MtpReadStream::Drop` spawns detached cancel task to prevent `ReceiveStream` panic
- Cancelled copy operations now log at INFO, not ERROR
- Upgraded `mtp-rs` to v0.12.0 (streaming uploads, `Send` bounds on stream types)
- Updated CLAUDE.md files for volume, write_operations, listing, and mtp modules1 parent cac24a1 commit 531bb9b
40 files changed
Lines changed: 3809 additions & 3251 deletions
File tree
- apps/desktop/src-tauri
- src
- commands
- file_system
- file_system
- listing
- volume
- write_operations
- mtp
- connection
- docs/specs
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 | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
Lines changed: 6 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 100 | + | |
104 | 101 | | |
105 | 102 | | |
106 | 103 | | |
107 | | - | |
108 | | - | |
| 104 | + | |
109 | 105 | | |
110 | 106 | | |
111 | 107 | | |
| |||
129 | 125 | | |
130 | 126 | | |
131 | 127 | | |
132 | | - | |
| 128 | + | |
133 | 129 | | |
134 | 130 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 131 | + | |
140 | 132 | | |
141 | 133 | | |
142 | 134 | | |
143 | | - | |
144 | | - | |
| 135 | + | |
145 | 136 | | |
146 | 137 | | |
147 | 138 | | |
| |||
Lines changed: 27 additions & 59 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
107 | 99 | | |
108 | 100 | | |
109 | 101 | | |
| |||
153 | 145 | | |
154 | 146 | | |
155 | 147 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
177 | 161 | | |
178 | 162 | | |
179 | 163 | | |
| |||
307 | 291 | | |
308 | 292 | | |
309 | 293 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | 294 | | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
| 295 | + | |
328 | 296 | | |
329 | 297 | | |
330 | 298 | | |
| |||
0 commit comments