Skip to content

RelativePattern not limiting watching to workspace subdirectory #35255

@mjbvz

Description

@mjbvz

#34831

  • VSCode Version: Code - Insiders 1.17.0-insider (e059563, 2017-09-27T09:56:06.042Z)
  • OS Version: Windows_NT x64 10.0.17004

Steps to Reproduce:

    const watcher = vscode.workspace.createFileSystemWatcher(
        new RelativePattern(
            path.join(vscode.workspace.rootPath, 'sub'),
            '*.ts'))

    watcher.onDidChange(x => console.log('change ' + x));
  1. Open a workspace and try editing and saving ts files in the root folder and then saving ts files under sub

Expected
Change only fires for ts files under sub

Bug
Change is fired for files under the root as well files under sub.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions