mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 19:17:46 +08:00
defaulting file ttl to volume ttl
fix https://github.com/chrislusf/seaweedfs/issues/992
This commit is contained in:
@@ -48,6 +48,9 @@ func ReadTTL(ttlString string) (*TTL, error) {
|
||||
|
||||
// read stored bytes to a ttl
|
||||
func LoadTTLFromBytes(input []byte) (t *TTL) {
|
||||
if input[0] == 0 && input[1] == 0 {
|
||||
return EMPTY_TTL
|
||||
}
|
||||
return &TTL{Count: input[0], Unit: input[1]}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user