mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-30 17:00:48 +01:00
fix IsExpired
This commit is contained in:
1 parent
47c7d5fc8f
commit
e2b43c0b5e
1 file changed
+1
-1
@@ -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