fix: object lock compliance mode allows deletion (#1687)

Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
LeonWang0735
2026-02-03 17:06:24 +08:00
committed by GitHub
parent 2f66f15524
commit 36f14acbe9
4 changed files with 188 additions and 9 deletions
@@ -106,7 +106,7 @@ pub fn check_retention_for_modification(
None
}
pub(crate) fn add_years(dt: OffsetDateTime, years: i32) -> OffsetDateTime {
pub fn add_years(dt: OffsetDateTime, years: i32) -> OffsetDateTime {
let target_year = dt.year() + years;
dt.replace_year(target_year)
.or_else(|_| {