mirror of https://github.com/minio/minio.git
rename checkPathValid() to getValidPath() (#5949)
This commit is contained in:
parent
f9e8ac429e
commit
4eb788df79
|
@ -102,7 +102,7 @@ func NewFSObjectLayer(fsPath string) (ObjectLayer, error) {
|
|||
}
|
||||
|
||||
var err error
|
||||
if fsPath, err = checkPathValid(fsPath); err != nil {
|
||||
if fsPath, err = getValidPath(fsPath); err != nil {
|
||||
return nil, uiErrUnableToWriteInBackend(err)
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ func checkPathLength(pathName string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func checkPathValid(path string) (string, error) {
|
||||
func getValidPath(path string) (string, error) {
|
||||
if path == "" {
|
||||
return path, errInvalidArgument
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ func isDirEmpty(dirname string) bool {
|
|||
// Initialize a new storage disk.
|
||||
func newPosix(path string) (StorageAPI, error) {
|
||||
var err error
|
||||
if path, err = checkPathValid(path); err != nil {
|
||||
if path, err = getValidPath(path); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue