reformat a bit
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Alex 2022-06-10 11:03:01 +02:00
parent 9695e747e6
commit 8bbd0db43d
Signed by: lx
GPG key ID: 0E496D15096376BE

View file

@ -259,8 +259,10 @@ async fn check_quotas(
if let Some(ms) = quotas.max_size { if let Some(ms) = quotas.max_size {
let current_size = counters.get(BYTES).cloned().unwrap_or_default(); let current_size = counters.get(BYTES).cloned().unwrap_or_default();
if cnt_size_diff > 0 && current_size + cnt_size_diff > ms as i64 { if cnt_size_diff > 0 && current_size + cnt_size_diff > ms as i64 {
return Err(Error::forbidden(format!("Bucket size quota is reached, maximum total sie of objects for this bucket: {}. The bucket is already {} bytes, and this object would add {} bytes.", ms, return Err(Error::forbidden(format!(
current_size, size))); "Bucket size quota is reached, maximum total sie of objects for this bucket: {}. The bucket is already {} bytes, and this object would add {} bytes.",
ms, current_size, size
)));
} }
} }