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

@@ -68,7 +68,7 @@ func (store *CassandraStore) FindEntry(fullpath filer2.FullPath) (entry *filer2.
"SELECT meta FROM filemeta WHERE directory=? AND name=?",
dir, name).Consistency(gocql.One).Scan(&data); err != nil {
if err != gocql.ErrNotFound {
return nil, fmt.Errorf("read entry %s: %v", fullpath, err)
return nil, filer2.ErrNotFound
}
}