* A deleted DIRECTORY arrives as one event on the directory's own path — * no source extension, so the source-file filter drops it, and the files * underneath may never get events of their own (Windows's recursive * watcher reports only the top-most removed entry; macOS FSEvents can * co
(rel: string)
| 608 | * costs at most one no-op scan-diff, absorbed by the debounce. |
| 609 | */ |
| 610 | private maybeScheduleForRemovedDir(rel: string): void { |
| 611 | try { |
| 612 | fs.statSync(path.join(this.projectRoot, rel)); |
| 613 | return; // still on disk — an ordinary non-source change, ignore |
| 614 | } catch { |
| 615 | /* gone — fall through */ |
| 616 | } |
| 617 | logDebug('Non-source path removed; scheduling sync for possible directory removal', { |
| 618 | path: rel, |
| 619 | }); |
| 620 | this.needsFullScan = true; |
| 621 | this.scheduleSync(); |
| 622 | } |
| 623 | |
| 624 | /** Close and forget the watch for a directory that errored/was removed. */ |
| 625 | private unwatchDir(dir: string): void { |
no test coverage detected