serve s3: fix overwrite of files with 0 length file
Before this change overwriting an existing file with a 0 length file didn't update the file size. This change corrects the issue and makes sure the file is truncated properly. This was discovered by the full integration tests.
This commit is contained in:
parent
aaa897337d
commit
0244caf13a
1 changed files with 0 additions and 5 deletions
|
@ -282,11 +282,6 @@ func (b *s3Backend) PutObject(
|
|||
}
|
||||
}
|
||||
|
||||
if size == 0 {
|
||||
// maybe a touch operation
|
||||
return b.TouchObject(fp, meta)
|
||||
}
|
||||
|
||||
f, err := b.vfs.Create(fp)
|
||||
if err != nil {
|
||||
return result, err
|
||||
|
|
Loading…
Reference in a new issue