XL/FS: Rewrite in new format.

This commit is contained in:
Harshavardhana
2016-05-20 20:48:47 -07:00
parent 63c65b4635
commit 293d246f95
36 changed files with 3560 additions and 3076 deletions

View File

@@ -333,6 +333,8 @@ func (s fsStorage) ReadFile(volume string, path string, offset int64) (readClose
return nil, errFileNotFound
} else if os.IsPermission(err) {
return nil, errFileAccessDenied
} else if strings.Contains(err.Error(), "not a directory") {
return nil, errFileNotFound
}
return nil, err
}
@@ -425,7 +427,6 @@ func (s fsStorage) StatFile(volume, path string) (file FileInfo, err error) {
// Return all errors here.
return FileInfo{}, err
}
// If its a directory its not a regular file.
if st.Mode().IsDir() {
return FileInfo{}, errFileNotFound