Explorar o código

Don't import JSON dashboards from hidden directories.

Tom Wilkie %!s(int64=8) %!d(string=hai) anos
pai
achega
0015183a7b
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      pkg/services/search/json_index.go

+ 3 - 0
pkg/services/search/json_index.go

@@ -90,6 +90,9 @@ func (index *JsonDashIndex) updateIndex() error {
 			return err
 		}
 		if f.IsDir() {
+			if strings.HasPrefix(f.Name(), ".") {
+				return filepath.SkipDir
+			}
 			return nil
 		}