We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cbee38 commit 5ced7e1Copy full SHA for 5ced7e1
agent/agentcontainers/watcher/watcher.go
@@ -116,6 +116,7 @@ func (f *fsnotifyWatcher) Remove(file string) error {
116
// If no more files in this directory are being watched, stop
117
// watching the directory.
118
if f.watchedDirs[dir] <= 0 {
119
+ f.watchedDirs[dir] = 0 // Ensure non-negative count.
120
if err := f.Watcher.Remove(dir); err != nil {
121
return xerrors.Errorf("remove directory from watcher: %w", err)
122
}
0 commit comments