Commit e8263c6d authored by Jakub Sztandera's avatar Jakub Sztandera

Return and log errors in Walk function

We have some random crashes there and it would be good
to know what are erros that are causing those crashes.

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>
parent 7d8cb311
......@@ -319,6 +319,10 @@ func (fs *Datastore) Query(q query.Query) (query.Results, error) {
go func() {
defer close(reschan)
err := filepath.Walk(fs.path, func(path string, info os.FileInfo, err error) error {
if err != nil {
log.Errorf("Walk func in Query got error: %v", err)
return err
}
if !info.Mode().IsRegular() || strings.HasPrefix(info.Name(), ".") {
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