oci: fix panic on double close
and listen to a comment saying explicitly not to close that channel there :facepalm:
@@ -1130,7 +1130,6 @@ func WatchForFile(path string, done chan struct{}, opsToWatch ...fsnotify.Op) (c
}
}()
if err := watcher.Add(dir); err != nil {
- close(done)
return nil, err
}
return ch, nil
