mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Ignore file start with dots
This commit is contained in:
parent
b385a94fed
commit
cba9a90fd1
@ -22,6 +22,7 @@ package config
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"golang.org/x/exp/inotify"
|
||||
@ -79,6 +80,11 @@ func (s *sourceFile) watch() error {
|
||||
}
|
||||
|
||||
func (s *sourceFile) processEvent(e *inotify.Event) error {
|
||||
// Ignore file start with dots
|
||||
if strings.HasPrefix(e.Name, ".") {
|
||||
glog.V(4).Infof("Ignored pod manifest: %s, because it starts with dots", e.Name)
|
||||
return nil
|
||||
}
|
||||
var eventType podEventType
|
||||
switch {
|
||||
case (e.Mask & inotify.IN_ISDIR) > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user