mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-07-19 22:42:20 +00:00
fix IsExpired
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user