watcher - do not allow empty strings in exclude/include setting (#203883)

This commit is contained in:
Benjamin Pasero
2024-01-31 12:32:57 +01:00
committed by GitHub
parent 694f90fbf8
commit ba2cf46e20
2 changed files with 3 additions and 3 deletions
@@ -277,7 +277,7 @@ export class MainThreadFileSystemEventService implements MainThreadFileSystemEve
const config = this._configurationService.getValue<IFilesConfiguration>();
if (config.files?.watcherExclude) {
for (const key in config.files.watcherExclude) {
if (config.files.watcherExclude[key] === true) {
if (key && config.files.watcherExclude[key] === true) {
opts.excludes.push(key);
}
}
@@ -299,7 +299,7 @@ export class MainThreadFileSystemEventService implements MainThreadFileSystemEve
const config = this._configurationService.getValue<IFilesConfiguration>();
if (config.files?.watcherExclude) {
for (const key in config.files.watcherExclude) {
if (config.files.watcherExclude[key] === true) {
if (key && config.files.watcherExclude[key] === true) {
if (!opts.includes) {
opts.includes = [];
}
@@ -109,7 +109,7 @@ export class WorkspaceWatcher extends Disposable {
const config = this.configurationService.getValue<IFilesConfiguration>({ resource: workspace.uri });
if (config.files?.watcherExclude) {
for (const key in config.files.watcherExclude) {
if (config.files.watcherExclude[key] === true) {
if (key && config.files.watcherExclude[key] === true) {
excludes.push(key);
}
}