mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
added missing error check
This commit is contained in:
parent
0aad894b9d
commit
659d9df117
@ -176,11 +176,13 @@ func (prober *flexVolumeProber) updateProbeNeeded() {
|
|||||||
// on its parent directory.
|
// on its parent directory.
|
||||||
func (prober *flexVolumeProber) addWatchRecursive(filename string) error {
|
func (prober *flexVolumeProber) addWatchRecursive(filename string) error {
|
||||||
addWatch := func(path string, info os.FileInfo, err error) error {
|
addWatch := func(path string, info os.FileInfo, err error) error {
|
||||||
|
if err == nil {
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
if err := prober.watcher.AddWatch(path); err != nil {
|
if err := prober.watcher.AddWatch(path); err != nil {
|
||||||
glog.Errorf("Error recursively adding watch: %v", err)
|
glog.Errorf("Error recursively adding watch: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return prober.fs.Walk(filename, addWatch)
|
return prober.fs.Walk(filename, addWatch)
|
||||||
|
Loading…
Reference in New Issue
Block a user