s3: fix directory marker code #3453

Use Update to upload the directory markers
This commit is contained in:
Nick Craig-Wood 2023-04-28 17:22:45 +01:00
parent 70fe2ac852
commit baf16a65f0
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}