Przeglądaj źródła

Don't import JSON dashboards from hidden directories.

Tom Wilkie 8 lat temu
rodzic
commit
0015183a7b
1 zmienionych plików z 3 dodań i 0 usunięć
  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
 		}