瀏覽代碼

Don't import JSON dashboards from hidden directories.

Tom Wilkie 8 年之前
父節點
當前提交
0015183a7b
共有 1 個文件被更改,包括 3 次插入0 次删除
  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
 		}