mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-11 16:24:26 +01:00
watcher - do not allow empty strings in exclude/include setting (#203883)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user