Commit 0e3a27ab authored by Jeromy's avatar Jeromy

fix panic on zero length filename

parent 263918b3
...@@ -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