cache --cleanup should handle directories created by restic check.
Because there is no guarantee that a cleanup of these directories will occur after the "restic check", we extend the behavior to detect and manage these specific cache directories and allow their cleanup too.
This commit is contained in:
parent
95eb859b54
commit
1b23675f21
1 changed files with 1 additions and 1 deletions
2
internal/cache/cache.go
vendored
2
internal/cache/cache.go
vendored
|
@ -172,7 +172,7 @@ func updateTimestamp(d string) error {
|
|||
const MaxCacheAge = 30 * 24 * time.Hour
|
||||
|
||||
func validCacheDirName(s string) bool {
|
||||
r := regexp.MustCompile(`^[a-fA-F0-9]{64}$`)
|
||||
r := regexp.MustCompile(`^[a-fA-F0-9]{64}$|^restic-check-cache-[0-9]+$`)
|
||||
return r.MatchString(s)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue