Skip to content

Commit

Permalink
(TEST THIS) [?] Return violation if total bytes is equal to max bytes.
Browse files Browse the repository at this point in the history
Before this commit, it was possible to write more bytes to storage even
when the total bytes recorded matched the max bytes allowed.
  • Loading branch information
korydraughn committed Apr 21, 2024
1 parent 6ff76b6 commit 072b6eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ namespace
if (const auto iter = _tracking_info.find(max_attr_name); iter != std::end(_tracking_info)) {
const auto total = get_attribute_value<size_type>(_tracking_info, _attrs.total_size_in_bytes());

if (total + _delta > iter->second) {
if (total + _delta >= iter->second) {
throw irods::logical_quotas_error{
"Logical Quotas Policy Violation: Adding object exceeds maximum data size in bytes limit",
SYS_NOT_ALLOWED};
Expand Down

0 comments on commit 072b6eb

Please sign in to comment.