Skip to content

API: file watching doesn't report file deletions caused by directory deletion #109754

@stamblerre

Description

@stamblerre

In the Go language server, we register a file watcher with a GlobPattern of "**/*.{go,mod,sum}". I would expect that this file watcher would report deletions of files caused by the deletion of a directory, but this doesn't seem to be the case.

For example, if the workspace contains a directory foo with the file foo.go, deleting foo either in the terminal (rm -rf foo) or in the VS Code UI does not result in any change notifications for foo/foo.go. The only way I was able to get notifications was when I registered a watcher with the GlobPattern of "**", but we'd prefer to avoid registering for notifications for all files in the workspace.

Is this expected behavior or have we made some mistake here?

VSCode Version:

1.51.0-insider
2ee8b8c
x64

OS Version: Mac OS Catalina 10.15.7

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions