Commit 6c88d25f authored by Jeromy's avatar Jeromy Committed by Jakub Sztandera

fix panic on zero length filename

parent e63957b6
...@@ -320,7 +320,7 @@ func (fs *Datastore) Query(q query.Query) (query.Results, error) { ...@@ -320,7 +320,7 @@ func (fs *Datastore) Query(q query.Query) (query.Results, error) {
defer close(reschan) defer close(reschan)
err := filepath.Walk(fs.path, func(path string, info os.FileInfo, err error) error { err := filepath.Walk(fs.path, func(path string, info os.FileInfo, err error) error {
if !info.Mode().IsRegular() || info.Name()[0] == '.' { if !info.Mode().IsRegular() || strings.HasPrefix(info.Name(), ".") {
return nil return nil
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment