Skip to content

Commit

Permalink
Refactor file filtering logic in ParcelWatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Sep 16, 2024
1 parent 8b3b0e6 commit e3ec7c0
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/vs/platform/files/node/watcher/parcel/parcelWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,20 +551,7 @@ export class ParcelWatcher extends BaseWatcher implements IRecursiveWatcherWithS

// Filtering
rootDeleted = event.type === FileChangeType.DELETED && isEqual(event.resource.fsPath, watcher.request.path, !isLinux);
if (
isFiltered(event, filter) ||
// Explicitly exclude changes to root if we have any
// to avoid VS Code closing all opened editors which
// can happen e.g. in case of network connectivity
// issues
// (https://github.com/microsoft/vscode/issues/136673)
//
// Update 2024: with the new correlated events, we
// really do not want to skip over file events any
// more, so we only ignore this event for non-correlated
// watch requests.
(rootDeleted && !this.isCorrelated(watcher.request))
) {
if (isFiltered(event, filter)) {
if (this.verboseLogging) {
this.traceWithCorrelation(` >> ignored (filtered) ${event.resource.fsPath}`, watcher.request);
}
Expand Down

0 comments on commit e3ec7c0

Please sign in to comment.