mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 12:55:18 +00:00
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
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 New Issue
Block a user