mirror of
https://github.com/octoleo/restic.git
synced 2024-12-28 04:56:04 +00:00
repository: Simplify index age calculation
This commit is contained in:
parent
d19f05c960
commit
d9a80e07b9
@ -107,7 +107,7 @@ var IndexFull = func(idx *Index) bool {
|
|||||||
for typ := range idx.byType {
|
for typ := range idx.byType {
|
||||||
blobs += idx.byType[typ].len()
|
blobs += idx.byType[typ].len()
|
||||||
}
|
}
|
||||||
age := time.Now().Sub(idx.created)
|
age := time.Since(idx.created)
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case age >= indexMaxAge:
|
case age >= indexMaxAge:
|
||||||
|
Loading…
Reference in New Issue
Block a user