server: Deadcode removal. (#1517)

master
Harshavardhana 9 years ago committed by Anand Babu (AB) Periasamy
parent bf563afb80
commit 937d68202d
  1. 6
      api-resources.go
  2. 9
      bucket-policy.go
  3. 9
      object-errors.go
  4. 10
      posix-utils.go
  5. 12
      posix.go
  6. 0
      test-utils_test.go
  7. 6
      xl-erasure-v1-errors.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
}

@ -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()

@ -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
}

@ -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",

@ -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 == "" {

@ -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")

Loading…
Cancel
Save