watcher - do not run extra glob matching

This commit is contained in:
Benjamin Pasero
2018-08-27 13:58:39 +02:00
parent 7a803e5a05
commit b6d0e47a70
@@ -113,7 +113,8 @@ export class ChokidarWatcherService implements IWatcherService {
};
// if there's only one request, use the built-in ignore-filterering
if (requests.length === 1) {
const isSingleFolder = requests.length === 1;
if (isSingleFolder) {
watcherOpts.ignored = requests[0].ignored;
}
@@ -194,8 +195,12 @@ export class ChokidarWatcherService implements IWatcherService {
return;
}
if (isIgnored(path, watcher.requests)) {
return;
// if there's more than one request we need to do
// extra filtering due to potentially overlapping roots
if (!isSingleFolder) {
if (isIgnored(path, watcher.requests)) {
return;
}
}
let event = { type: eventType, path };