on master help sign in
remove-old-stack-work-libs.hs: hash can also be 20 chars!
6383d6eJens Petersen
etc/diskspace/remove-old-stack-work-libs.hs+1−1
@@ -31,7 +31,7 @@ main = do
31 if length dashes < 2
31 if length dashes < 2
32 then error $ p ++ " not in name-version-hash format"
32 then error $ p ++ " not in name-version-hash format"
33 else let final = last dashes in
33 else let final = last dashes in
34− if length p - final `elem` [22,23] then take final p
34+ if length p - final `elem` [23,22,21] then take final p
35 else error $ p ++ " has incorrect hash length"
35 else error $ p ++ " has incorrect hash length"
36
36
37 removeDashSegment = init . dropWhileEnd (/= '-')
37 removeDashSegment = init . dropWhileEnd (/= '-')