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

serve s3: fix overwrite of files with 0 length file

Nick Craig-Wood0244caf13adc
diff --git a/cmd/serve/s3/backend.go b/cmd/serve/s3/backend.go
index 305012f34..397760102 100644
--- a/cmd/serve/s3/backend.go
+++ b/cmd/serve/s3/backend.go
@@ -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