mirror of
https://github.com/pgsty/minio.git
synced 2026-08-07 16:21:14 +03:00
backend/fs: Refactor multipart upload
This patch modifies multipart upload related functions as below * New multipart upload call creates file EXPORT_DIR/.minio/BUCKET/PATH/TO/OBJECT/UPLOAD_ID.uploadid * Put object part call creates file EXPORT_DIR/.minio/BUCKET/PATH/TO/OBJECT/UPLOAD_ID.PART_NUMBER.MD5SUM_STRING * Abort multipart call removes all files matching EXPORT_DIR/.minio/BUCKET/PATH/TO/OBJECT/UPLOAD_ID.* * Complete multipart call does 1. creates a staging file EXPORT_DIR/.minio/BUCKET/PATH/TO/OBJECT/UPLOAD_ID.complete.TEMP_NAME then renames to EXPORT_DIR/.minio/BUCKET/PATH/TO/OBJECT/UPLOAD_ID.complete 2. rename staging file EXPORT_DIR/.minio/BUCKET/PATH/TO/OBJECT/UPLOAD_ID.complete to EXPORT_DIR/BUCKET/PATH/TO/OBJECT
This commit is contained in:
@@ -31,12 +31,17 @@ const (
|
||||
)
|
||||
|
||||
// isDirExist - returns whether given directory is exist or not.
|
||||
func isDirExist(dirname string) (status bool, err error) {
|
||||
func isDirExist(dirname string) (bool, error) {
|
||||
fi, err := os.Lstat(dirname)
|
||||
if err == nil {
|
||||
status = fi.IsDir()
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
return false, err
|
||||
}
|
||||
return
|
||||
|
||||
return fi.IsDir(), nil
|
||||
}
|
||||
|
||||
func (fs *Filesystem) saveTreeWalk(params listObjectParams, walker *treeWalker) {
|
||||
|
||||
Reference in New Issue
Block a user