record: prevent recordDeleteAfter from deleting current segment (#4331)

This commit is contained in:
Alessandro Ros 2025-03-16 12:24:40 +01:00 committed by GitHub
parent 3d16cf40b4
commit b64650ca4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 2 deletions

View file

@ -512,6 +512,10 @@ func (pconf *Path) validate(
return fmt.Errorf("maximum segment duration is 1 day")
}
if pconf.RecordDeleteAfter != 0 && pconf.RecordDeleteAfter < pconf.RecordSegmentDuration {
return fmt.Errorf("'recordDeleteAfter' cannot be lower than 'recordSegmentDuration'")
}
// Authentication (deprecated)
if deprecatedCredentialsMode {