mirror of
https://github.com/restic/restic.git
synced 2026-05-22 18:15:23 +00:00
simplified prefix removal, removed unnecessary if-else statements
This commit is contained in:
Vendored
+1
-5
@@ -175,11 +175,7 @@ const MaxCacheAge = 30 * 24 * time.Hour
|
||||
|
||||
func validCacheDirName(s string) bool {
|
||||
r := regexp.MustCompile(`^[a-fA-F0-9]{64}$`)
|
||||
if !r.MatchString(s) {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return r.MatchString(s)
|
||||
}
|
||||
|
||||
// listCacheDirs returns the list of cache directories.
|
||||
|
||||
Reference in New Issue
Block a user