Browse Source

fix IsExpired

pull/7426/head
Konstantin Lebedev 1 month ago
parent
commit
e2b43c0b5e
  1. 2
      weed/pb/filer_pb/filer_pb_helper.go

2
weed/pb/filer_pb/filer_pb_helper.go

@ -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()
}

Loading…
Cancel
Save