set filer2.ErrNotFound for not found entry

This commit is contained in:
Chris Lu
2018-07-20 02:14:18 -07:00
parent dad733086a
commit 80d80daf64
5 changed files with 21 additions and 14 deletions

View File

@@ -64,7 +64,7 @@ func (store *AbstractSqlStore) FindEntry(fullpath filer2.FullPath) (*filer2.Entr
row := store.DB.QueryRow(store.SqlFind, hashToLong(dir), name, dir)
var data []byte
if err := row.Scan(&data); err != nil {
return nil, fmt.Errorf("read entry %s: %v", fullpath, err)
return nil, filer2.ErrNotFound
}
entry := &filer2.Entry{