Skip hidden directories on indexing (#279)

This commit is contained in:
Tyler Rockwood 2020-04-06 09:15:11 -05:00 committed by GitHub
parent ae5b6b759e
commit bf2b5ca108
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,7 +101,13 @@ func (ind *Index) Start(options IndexOptions) map[string]bool {
return nil
}
if fileInfo.IsDir() || strings.HasPrefix(filepath.Base(fileName), ".") {
hidden := strings.HasPrefix(filepath.Base(fileName), ".")
if fileInfo.IsDir() && hidden {
return filepath.SkipDir
}
if fileInfo.IsDir() || hidden {
return nil
}