forked from TrueCloudLab/rclone
s3: fix directory marker code #3453
Use Update to upload the directory markers
This commit is contained in:
parent
70fe2ac852
commit
baf16a65f0
1 changed files with 1 additions and 1 deletions
|
@ -3996,7 +3996,7 @@ func (f *Fs) createDirectoryMarker(ctx context.Context, bucket, dir string) erro
|
||||||
// Upload it if not
|
// Upload it if not
|
||||||
fs.Debugf(o, "Creating directory marker")
|
fs.Debugf(o, "Creating directory marker")
|
||||||
content := io.Reader(strings.NewReader(""))
|
content := io.Reader(strings.NewReader(""))
|
||||||
_, err = f.Put(ctx, content, o)
|
err = o.Update(ctx, content, o)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("creating directory marker failed: %w", err)
|
return fmt.Errorf("creating directory marker failed: %w", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue