fix IsExpired

This commit is contained in:
Konstantin Lebedev committed 2025-11-03 18:07:24 +05:00
1 parent 47c7d5fc8f
commit e2b43c0b5e
1 file changed
+1 -1
+1 -1
View File
@@ -25,7 +25,7 @@ func (entry *Entry) IsDirectoryKeyObject() bool {
}
func (entry *Entry) IsExpired() bool {
return entry.Attributes != nil && entry.Attributes.TtlSec > 0 &&
return entry != nil && entry.Attributes != nil && entry.Attributes.TtlSec > 0 &&
(entry.Attributes.GetMtime()+int64(entry.Attributes.TtlSec)) >= time.Now().Unix()
}