Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

s3: fix directory marker code #3453

Nick Craig-Woodbaf16a65f02f
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)
}