|
@@ -161,6 +161,8 @@ func (wh *watcherHub) clone() *watcherHub {
|
|
|
// isHidden checks to see if key path is considered hidden to watch path i.e. the
|
|
// isHidden checks to see if key path is considered hidden to watch path i.e. the
|
|
|
// last element is hidden or it's within a hidden directory
|
|
// last element is hidden or it's within a hidden directory
|
|
|
func isHidden(watchPath, keyPath string) bool {
|
|
func isHidden(watchPath, keyPath string) bool {
|
|
|
|
|
+ // if watch path is just a "/", after path will start without "/"
|
|
|
|
|
+ // add a "/" to deal with the special case when watchPath is "/"
|
|
|
afterPath := path.Clean("/" + keyPath[len(watchPath):])
|
|
afterPath := path.Clean("/" + keyPath[len(watchPath):])
|
|
|
return strings.Contains(afterPath, "/_")
|
|
return strings.Contains(afterPath, "/_")
|
|
|
}
|
|
}
|