mirror of
https://github.com/minio/minio.git
synced 2025-11-28 05:04:14 -05:00
storage/server/client: Enable storage server, enable client storage.
This commit is contained in:
7
fs.go
7
fs.go
@@ -66,7 +66,7 @@ func isDirEmpty(dirname string) (status bool, err error) {
|
||||
|
||||
// isDirExist - returns whether given directory exists or not.
|
||||
func isDirExist(dirname string) (bool, error) {
|
||||
fi, e := os.Lstat(dirname)
|
||||
fi, e := os.Stat(dirname)
|
||||
if e != nil {
|
||||
if os.IsNotExist(e) {
|
||||
return false, nil
|
||||
@@ -322,6 +322,8 @@ func (s fsStorage) ListFiles(volume, prefix, marker string, recursive bool, coun
|
||||
if err == nil {
|
||||
// Prefix does not exist, not an error just respond empty list response.
|
||||
return nil, true, nil
|
||||
} else if strings.Contains(err.Error(), "not a directory") {
|
||||
return nil, true, nil
|
||||
}
|
||||
// Rest errors should be treated as failure.
|
||||
return nil, true, err
|
||||
@@ -465,6 +467,9 @@ func (s fsStorage) StatFile(volume, path string) (file FileInfo, err error) {
|
||||
if os.IsNotExist(err) {
|
||||
return FileInfo{}, errFileNotFound
|
||||
}
|
||||
if strings.Contains(err.Error(), "not a directory") {
|
||||
return FileInfo{}, errIsNotRegular
|
||||
}
|
||||
return FileInfo{}, err
|
||||
}
|
||||
if st.Mode().IsDir() {
|
||||
|
||||
Reference in New Issue
Block a user