filer mysqlstore bug fix

This commit is contained in:
霍晓栋
2016-09-08 11:35:54 +08:00
parent 1c2affea8e
commit 78474409a5
9 changed files with 50 additions and 30 deletions

View File

@@ -53,7 +53,9 @@ func (fl *FileListInLevelDb) DeleteFile(dirId filer.DirectoryId, fileName string
}
func (fl *FileListInLevelDb) FindFile(dirId filer.DirectoryId, fileName string) (fid string, err error) {
data, e := fl.db.Get(genKey(dirId, fileName), nil)
if e != nil {
if e == leveldb.ErrNotFound {
return "", filer.ErrNotFound
} else if e != nil {
return "", e
}
return string(data), nil