Commit 266026d
committed
Bugfix: MTP watcher misses external files
`invalidate_listing_cache` was called with the raw `mtp://` URL from `LISTING_CACHE` (e.g., `mtp://mtp-device/65537/Documents`), but the MTP listing cache keys use `normalize_mtp_path` (e.g., `/Documents`). The key mismatch made every invalidation a no-op, so `list_directory` kept returning stale cached entries and `compute_diff` found no changes.
On macOS this was masked because FSEvents fires with enough latency that the 5s cache TTL expires before diffs are computed. On Linux, inotify fires instantly, so all diff attempts hit the still-fresh cache.1 parent 4380469 commit 266026d
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
248 | 250 | | |
249 | | - | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
0 commit comments