Skip to content

Commit

Permalink
Use Lstat in plugin watcher to avoid Windows problem
Browse files Browse the repository at this point in the history
User Lstat in plugin watcher due to Windows issue

Change-Id: I4f9b808829f1a56dc622e343c291d3ffc316f416
  • Loading branch information
jingxu97 committed Mar 4, 2021
1 parent 0bfcca3 commit 8ad60e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (w *Watcher) traversePluginDir(dir string) error {
func (w *Watcher) handleCreateEvent(event fsnotify.Event) error {
klog.V(6).Infof("Handling create event: %v", event)

fi, err := os.Stat(event.Name)
fi, err := os.Lstat(event.Name)
if err != nil {
return fmt.Errorf("stat file %s failed: %v", event.Name, err)
}
Expand Down

0 comments on commit 8ad60e7

Please sign in to comment.