Skip hidden directories on indexing (#279)
This commit is contained in:
parent
ae5b6b759e
commit
bf2b5ca108
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue