Commit 7dd9cfc
committed
SMB merge fix + move-pipeline logging
Bumps `smb2` to 0.8.0 and wires the new typed error variants into Cmdr:
- `map_smb_error`: `STATUS_OBJECT_NAME_COLLISION` → `VolumeError::AlreadyExists`
instead of falling through to a generic IoError. This unblocks
`copy_directory_streaming`'s merge-into-existing-directory path, which already
swallows AlreadyExists. Without this, retrying a move into a partially-
populated SMB directory blew up with "Protocol error: STATUS_OBJECT_NAME_COLLISION
during Create".
- SMB delete fast-path: replaces the substring match against
`"FILE_IS_A_DIRECTORY"` with a typed `is_file_is_a_directory(&smb2::Error)`
predicate. Same for the `rename(force)` dest-cleanup path, which previously
retried delete_directory on ANY delete_file error (could mask a real
PermissionDenied as a futile second attempt).
- Reworded the misleading "SMB treats already-exists as a merge" comment in
`volume_strategy.rs` — that wasn't true until smb2 0.8.0. Notes the version
guard so future regressions are easier to spot.
- Added WARN logging in `move_between_volumes` for the copy and source-delete
steps, plus the operation-level error path. The user's first failed move
produced only a generic FE "io_error" with no backend trace; now the file
path and raw `VolumeError` show up in `cmdr.log`.
- Added WARN logging in `LocalPosixVolume::delete` covering both the stat and
the remove call, including the `io::ErrorKind` and raw errno. Same
motivation: the move pipeline silently lost context here.
Tests:
- `map_smb_error_already_exists` and `is_file_is_a_directory_detects_typed_kind`
pin the new mappings.
- All 1568 existing tests still pass.
Note: This commit does NOT yet address the FE error dialog softening
(`friendly_error_from_volume_error` integration) or the recursive-delete bug
in `move_between_volumes` that's the actual root cause of the original first-
attempt failure — see follow-up discussion.
# Conflicts:
# apps/desktop/src-tauri/src/file_system/volume/smb.rs1 parent dc5f0b4 commit 7dd9cfc
6 files changed
Lines changed: 113 additions & 51 deletions
File tree
- apps/desktop/src-tauri
- src/file_system
- volume
- write_operations
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 | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
Lines changed: 27 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
300 | 310 | | |
301 | | - | |
302 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
303 | 325 | | |
304 | 326 | | |
305 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | 132 | | |
141 | 133 | | |
142 | 134 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | 135 | | |
147 | 136 | | |
| 137 | + | |
| 138 | + | |
148 | 139 | | |
149 | 140 | | |
150 | 141 | | |
| |||
1291 | 1282 | | |
1292 | 1283 | | |
1293 | 1284 | | |
1294 | | - | |
| 1285 | + | |
1295 | 1286 | | |
1296 | 1287 | | |
1297 | 1288 | | |
| |||
1335 | 1326 | | |
1336 | 1327 | | |
1337 | 1328 | | |
1338 | | - | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
1339 | 1333 | | |
1340 | 1334 | | |
1341 | 1335 | | |
1342 | 1336 | | |
1343 | 1337 | | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
1348 | 1349 | | |
1349 | 1350 | | |
1350 | 1351 | | |
| |||
2040 | 2041 | | |
2041 | 2042 | | |
2042 | 2043 | | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
2043 | 2057 | | |
2044 | 2058 | | |
2045 | | - | |
2046 | | - | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
2047 | 2063 | | |
2048 | 2064 | | |
2049 | 2065 | | |
2050 | 2066 | | |
2051 | | - | |
2052 | | - | |
2053 | | - | |
2054 | 2067 | | |
2055 | 2068 | | |
2056 | 2069 | | |
2057 | 2070 | | |
2058 | 2071 | | |
2059 | | - | |
2060 | | - | |
| 2072 | + | |
| 2073 | + | |
2061 | 2074 | | |
2062 | 2075 | | |
2063 | 2076 | | |
2064 | 2077 | | |
2065 | | - | |
| 2078 | + | |
| 2079 | + | |
2066 | 2080 | | |
2067 | 2081 | | |
2068 | 2082 | | |
| |||
Lines changed: 34 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
201 | 210 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
207 | 223 | | |
208 | 224 | | |
209 | 225 | | |
| |||
262 | 278 | | |
263 | 279 | | |
264 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
265 | 287 | | |
266 | 288 | | |
267 | 289 | | |
| |||
462 | 484 | | |
463 | 485 | | |
464 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
465 | 493 | | |
466 | 494 | | |
467 | 495 | | |
| |||
Lines changed: 10 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
124 | 121 | | |
| 122 | + | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
| |||
0 commit comments