From baf16a65f02f291453167628ec78cb681b56ff5c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 28 Apr 2023 17:22:45 +0100 Subject: [PATCH] s3: fix directory marker code #3453 Use Update to upload the directory markers --- backend/s3/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index e6cf4eea1..f5a87aaed 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -3996,7 +3996,7 @@ func (f *Fs) createDirectoryMarker(ctx context.Context, bucket, dir string) erro // Upload it if not fs.Debugf(o, "Creating directory marker") content := io.Reader(strings.NewReader("")) - _, err = f.Put(ctx, content, o) + err = o.Update(ctx, content, o) if err != nil { return fmt.Errorf("creating directory marker failed: %w", err) }