diff --git a/api-resources.go b/api-resources.go index 93d16c004..a3e6012a7 100644 --- a/api-resources.go +++ b/api-resources.go @@ -62,9 +62,3 @@ func getObjectResources(values url.Values) (uploadID string, partNumberMarker, m encodingType = values.Get("encoding-type") return } - -// Get upload id. -func getUploadID(values url.Values) (uploadID string) { - uploadID, _, _, _ = getObjectResources(values) - return -} diff --git a/bucket-policy.go b/bucket-policy.go index 6a7376e1d..325b12836 100644 --- a/bucket-policy.go +++ b/bucket-policy.go @@ -31,15 +31,6 @@ func getBucketsConfigPath() (string, error) { return filepath.Join(configPath, "buckets"), nil } -// createBucketsConfigPath - create buckets directory. -func createBucketsConfigPath() error { - bucketsConfigPath, err := getBucketsConfigPath() - if err != nil { - return err - } - return os.MkdirAll(bucketsConfigPath, 0700) -} - // getBucketConfigPath - get bucket config path. func getBucketConfigPath(bucket string) (string, error) { bucketsConfigPath, err := getBucketsConfigPath() diff --git a/object-errors.go b/object-errors.go index b7969fce3..dd807989a 100644 --- a/object-errors.go +++ b/object-errors.go @@ -233,12 +233,3 @@ type InvalidPart struct{} func (e InvalidPart) Error() string { return "One or more of the specified parts could not be found" } - -// InvalidPartOrder parts are not ordered as Requested -type InvalidPartOrder struct { - UploadID string -} - -func (e InvalidPartOrder) Error() string { - return "Invalid part order sent for " + e.UploadID -} diff --git a/posix-utils.go b/posix-utils.go index c2e354ed6..be26822a2 100644 --- a/posix-utils.go +++ b/posix-utils.go @@ -57,16 +57,6 @@ func isValidPath(path string) bool { return true } -// isValidPrefix verifies where the prefix is a valid path. -func isValidPrefix(prefix string) bool { - // Prefix can be empty. - if prefix == "" || prefix == "/" { - return true - } - // Verify if prefix is a valid path. - return isValidPath(prefix) -} - // List of reserved words for files, includes old and new ones. var reservedKeywords = []string{ "$multiparts", diff --git a/posix.go b/posix.go index f1f2c4ddb..f82b08143 100644 --- a/posix.go +++ b/posix.go @@ -52,18 +52,6 @@ func isDirEmpty(dirname string) (status bool, err error) { return status, err } -// isDirExist - returns whether given directory exists or not. -func isDirExist(dirname string) (bool, error) { - fi, e := os.Stat(dirname) - if e != nil { - if os.IsNotExist(e) { - return false, nil - } - return false, e - } - return fi.IsDir(), nil -} - // Initialize a new storage disk. func newPosix(diskPath string) (StorageAPI, error) { if diskPath == "" { diff --git a/test-utils.go b/test-utils_test.go similarity index 100% rename from test-utils.go rename to test-utils_test.go diff --git a/xl-erasure-v1-errors.go b/xl-erasure-v1-errors.go index a293c1dbe..6fc5305d4 100644 --- a/xl-erasure-v1-errors.go +++ b/xl-erasure-v1-errors.go @@ -18,17 +18,11 @@ package main import "errors" -// errFileSize - returned for missing file size. -var errFileSize = errors.New("Missing 'file.size' in metadata") - // errMaxDisks - returned for reached maximum of disks. var errMaxDisks = errors.New("Total number of disks specified is higher than supported maximum of '16'") // errNumDisks - returned for odd numebr of disks. var errNumDisks = errors.New("Invalid number of disks provided, should be always multiples of '2'") -// errModTime - returned for missing file modtime. -var errModTime = errors.New("Missing 'file.modTime' in metadata") - // errUnexpected - returned for any unexpected error. var errUnexpected = errors.New("Unexpected error - please report at https://github.com/minio/minio/issues")