Commit 57ef103
committed
Bugfix:
M1's short-circuit ("watcher-backed listing? skip the re-read") was right for MTP and SMB — a 1k-entry MTP folder takes ~17 s and holds the USB session, so an FE post-transfer refresh wedged the next user op. But for local volumes the short-circuit broke the post-transfer pane update: FSEvents on macOS races with the `/tmp` ↔ `/private/tmp` symlink boundary and with the fixture-recreate cycle E2E tests run in `beforeEach`, so the cache wasn't reliably fresh at the moment `refresh_listing` landed, and the FE's `refreshPanesAfterTransfer` had no recovery path. Symptom: copy MTP → local completed on disk and emitted "Copy complete", but the destination pane stayed empty (frame-by-frame inspection of the Playwright recording confirmed it).
Gate the short-circuit on `volume.local_path().is_none()` so MTP/SMB keep their fast path and local volumes always re-read. A local `list_directory` is sub-ms, so paying for it on an explicit refresh is the right trade — and that's exactly what the FE/user asked for when they called `refresh`.
Verified: the 3 previously-failing `MTP → local` Playwright tests (`mtp.spec.ts:333`, `:699`, `:1083`) now pass in 3.5-4 s each.refresh_listing always re-reads local volumes1 parent ecb495f commit 57ef103
1 file changed
Lines changed: 20 additions & 12 deletions
Lines changed: 20 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
334 | 344 | | |
335 | 345 | | |
336 | 346 | | |
337 | 347 | | |
338 | 348 | | |
339 | 349 | | |
340 | 350 | | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | 351 | | |
345 | 352 | | |
| 353 | + | |
346 | 354 | | |
347 | 355 | | |
348 | 356 | | |
349 | 357 | | |
350 | | - | |
| 358 | + | |
351 | 359 | | |
352 | 360 | | |
353 | 361 | | |
| |||
0 commit comments