Commit 03e56262 authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub

Merge pull request #45 from ipfs/feat/demote-to-warning

flatfs: dont error out Walk in case of FileNotFound error 
parents f6dfcbd0 312a1177
...@@ -313,6 +313,9 @@ func (fs *Datastore) Query(q query.Query) (query.Results, error) { ...@@ -313,6 +313,9 @@ func (fs *Datastore) Query(q query.Query) (query.Results, error) {
go func() { go func() {
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 os.IsNotExist(err) {
return nil
}
if err != nil { if err != nil {
log.Errorf("Walk func in Query got error: %v", err) log.Errorf("Walk func in Query got error: %v", err)
return err return err
......
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