rename checkPathValid() to getValidPath() (#5949)

master
Bala FA 7 years ago committed by kannappanr
parent f9e8ac429e
commit 4eb788df79
  1. 2
      cmd/fs-v1.go
  2. 4
      cmd/posix.go

@ -102,7 +102,7 @@ func NewFSObjectLayer(fsPath string) (ObjectLayer, error) {
} }
var err error var err error
if fsPath, err = checkPathValid(fsPath); err != nil { if fsPath, err = getValidPath(fsPath); err != nil {
return nil, uiErrUnableToWriteInBackend(err) return nil, uiErrUnableToWriteInBackend(err)
} }

@ -72,7 +72,7 @@ func checkPathLength(pathName string) error {
return nil return nil
} }
func checkPathValid(path string) (string, error) { func getValidPath(path string) (string, error) {
if path == "" { if path == "" {
return path, errInvalidArgument return path, errInvalidArgument
} }
@ -144,7 +144,7 @@ func isDirEmpty(dirname string) bool {
// Initialize a new storage disk. // Initialize a new storage disk.
func newPosix(path string) (StorageAPI, error) { func newPosix(path string) (StorageAPI, error) {
var err error var err error
if path, err = checkPathValid(path); err != nil { if path, err = getValidPath(path); err != nil {
return nil, err return nil, err
} }

Loading…
Cancel
Save