[pbs-devel] [PATCH proxmox-backup] upload_chunk: allow upload of empty blobs
Dominik Csapak
d.csapak at proxmox.com
Mon Jul 27 13:22:26 CEST 2020
a blob can be empty (e.g. an empty pct fw conf), so we
have to set the minimum size to the header size
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
fixes the problem some users had, e.g.
https://forum.proxmox.com/threads/ct-backup-error-parameter-encoded-size-value-must-have-a-minimum-value-of-13-got-12.73051/
src/api2/backup/upload_chunk.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api2/backup/upload_chunk.rs b/src/api2/backup/upload_chunk.rs
index 483ced3..ec95472 100644
--- a/src/api2/backup/upload_chunk.rs
+++ b/src/api2/backup/upload_chunk.rs
@@ -243,7 +243,7 @@ pub const API_METHOD_UPLOAD_BLOB: ApiMethod = ApiMethod::new(
&sorted!([
("file-name", false, &crate::api2::types::BACKUP_ARCHIVE_NAME_SCHEMA),
("encoded-size", false, &IntegerSchema::new("Encoded blob size.")
- .minimum((std::mem::size_of::<DataBlobHeader>() as isize) +1)
+ .minimum(std::mem::size_of::<DataBlobHeader>() as isize)
.maximum(1024*1024*16+(std::mem::size_of::<EncryptedDataBlobHeader>() as isize))
.schema()
)
--
2.20.1
More information about the pbs-devel
mailing list