Remove stale code from minio server (#5479)

This commit is contained in:
Harshavardhana
2018-01-31 18:28:28 -08:00
committed by kannappanr
parent 3b2486ebaf
commit 033cfb5cef
4 changed files with 0 additions and 50 deletions

View File

@@ -296,36 +296,6 @@ func fsCreateFile(filePath string, reader io.Reader, buf []byte, fallocSize int6
return bytesWritten, nil
}
// Removes uploadID at destination path.
func fsRemoveUploadIDPath(basePath, uploadIDPath string) error {
if basePath == "" || uploadIDPath == "" {
return errors.Trace(errInvalidArgument)
}
if err := checkPathLength(basePath); err != nil {
return errors.Trace(err)
}
if err := checkPathLength(uploadIDPath); err != nil {
return errors.Trace(err)
}
// List all the entries in uploadID.
entries, err := readDir(uploadIDPath)
if err != nil && err != errFileNotFound {
return errors.Trace(err)
}
// Delete all the entries obtained from previous readdir.
for _, entryPath := range entries {
err = fsDeleteFile(basePath, pathJoin(uploadIDPath, entryPath))
if err != nil && err != errFileNotFound {
return errors.Trace(err)
}
}
fsRemoveDir(uploadIDPath)
return nil
}
// fsFAllocate is similar to Fallocate but provides a convenient
// wrapper to handle various operating system specific errors.
func fsFAllocate(fd int, offset int64, len int64) (err error) {