etc/diskspace: reduce the guestimate on smallest package hash length

Failed for genvalidity-path-0.3.0.4-e4VgW10i2EhC0Gr0g1T
This commit is contained in:
Jens Petersen 2020-07-04 16:48:02 +08:00
parent 5cc0ab4d58
commit e96f08afcc

View File

@ -28,7 +28,7 @@ main = do
extractNameInternal :: String -> String
extractNameInternal p =
let (name,match,internal) = p =~ "-[0-9.]+-[0-9A-Za-z]{20,22}" :: (String, String, String)
let (name,match,internal) = p =~ "-[0-9.]+-[0-9A-Za-z]{19,22}" :: (String, String, String)
in if null match || null name then error $ p ++ " not in correct name-version-hash format"
else name ++ internal