mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 13:40:22 +03:00
posix: Return diskNotFound error rather than errVolumeNotFound (#1568)
Fixes #1559
This commit is contained in:
@@ -185,7 +185,8 @@ func (s fsStorage) getVolumeDir(volume string) (string, error) {
|
|||||||
var volsInfo []VolInfo
|
var volsInfo []VolInfo
|
||||||
volsInfo, err = getAllUniqueVols(s.diskPath)
|
volsInfo, err = getAllUniqueVols(s.diskPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return volumeDir, errVolumeNotFound
|
// For any errors, treat it as disk not found.
|
||||||
|
return volumeDir, errDiskNotFound
|
||||||
}
|
}
|
||||||
for _, vol := range volsInfo {
|
for _, vol := range volsInfo {
|
||||||
// Verify if lowercase version of the volume is equal to
|
// Verify if lowercase version of the volume is equal to
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ import "errors"
|
|||||||
// errDiskFull - cannot create volume or files when disk is full.
|
// errDiskFull - cannot create volume or files when disk is full.
|
||||||
var errDiskFull = errors.New("disk path full")
|
var errDiskFull = errors.New("disk path full")
|
||||||
|
|
||||||
|
// errDiskNotFount - cannot find the underlying configured disk anymore.
|
||||||
|
var errDiskNotFound = errors.New("disk not found")
|
||||||
|
|
||||||
// errFileNotFound - cannot find the file.
|
// errFileNotFound - cannot find the file.
|
||||||
var errFileNotFound = errors.New("file not found")
|
var errFileNotFound = errors.New("file not found")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user