aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_s3_clean_uploads.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2022-06-29 16:21:16 +0500
committerKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2022-06-29 16:21:16 +0500
commitbcbdc4cb37027be16810d0307676a3f7372f30e1 (patch)
treef155bc55e3dfe79bc864183f975c4d395c3cb334 /weed/shell/command_s3_clean_uploads.go
parentc6e6e303db12b61b899b62bfda7f65ae48f6e01c (diff)
downloadseaweedfs-bcbdc4cb37027be16810d0307676a3f7372f30e1.tar.xz
seaweedfs-bcbdc4cb37027be16810d0307676a3f7372f30e1.zip
use const multipart uploads folder
avoid error bucket NotEmpty if multipart uploads folder exist
Diffstat (limited to 'weed/shell/command_s3_clean_uploads.go')
-rw-r--r--weed/shell/command_s3_clean_uploads.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/shell/command_s3_clean_uploads.go b/weed/shell/command_s3_clean_uploads.go
index a6dc8f574..198f94363 100644
--- a/weed/shell/command_s3_clean_uploads.go
+++ b/weed/shell/command_s3_clean_uploads.go
@@ -3,6 +3,7 @@ package shell
import (
"flag"
"fmt"
+ "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants"
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/util"
"io"
@@ -68,7 +69,7 @@ func (c *commandS3CleanUploads) Do(args []string, commandEnv *CommandEnv, writer
}
func (c *commandS3CleanUploads) cleanupUploads(commandEnv *CommandEnv, writer io.Writer, filerBucketsPath string, bucket string, timeAgo time.Duration, signingKey string) error {
- uploadsDir := filerBucketsPath + "/" + bucket + "/.uploads"
+ uploadsDir := filerBucketsPath + "/" + bucket + "/" + s3_constants.MultipartUploadsFolder
var staleUploads []string
now := time.Now()
err := filer_pb.List(commandEnv, uploadsDir, "", func(entry *filer_pb.Entry, isLast bool) error {