Sfoglia il codice sorgente

Don't import JSON dashboards from hidden directories.

Tom Wilkie 8 anni fa
parent
commit
0015183a7b
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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
 		}