summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-22 20:47:14 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-22 20:47:14 -0400
commitf4e2dde8a8ceaf689ec5391174b53cb1b213ea8b (patch)
treea2865cce91287fa8fcb1aedba1c3759245bb9823 /Backend
parentff38e49eb453ccfd58ce0e424aeca97389ab0100 (diff)
fix perl refugee code
Diffstat (limited to 'Backend')
-rw-r--r--Backend/File.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Backend/File.hs b/Backend/File.hs
index 797d48747..3396db3e5 100644
--- a/Backend/File.hs
+++ b/Backend/File.hs
@@ -62,7 +62,7 @@ checkKeyFile k = do
copyKeyFile :: Key -> FilePath -> Annex (Bool)
copyKeyFile key file = do
remotes <- Remotes.withKey key
- if (0 == length remotes)
+ if (null remotes)
then do
showNote "not available"
showLocations key
@@ -142,7 +142,7 @@ checkRemoveKey key = do
"Could only verify the existence of " ++
(show have) ++ " out of " ++ (show need) ++
" necessary copies"
- if (0 /= length bad) then showTriedRemotes bad else return ()
+ if (not $ null bad) then showTriedRemotes bad else return ()
showLocations key
hint
return False
@@ -156,9 +156,9 @@ showLocations key = do
uuids <- liftIO $ keyLocations g key
let uuidsf = filter (\v -> v /= u) uuids
ppuuids <- prettyPrintUUIDs uuidsf
- if (0 < length uuidsf)
- then showLongNote $ "Try making some of these repositories available:\n" ++ ppuuids
- else showLongNote $ "No other repository is known to contain the file."
+ if (null uuidsf)
+ then showLongNote $ "No other repository is known to contain the file."
+ else showLongNote $ "Try making some of these repositories available:\n" ++ ppuuids
showTriedRemotes remotes =
showLongNote $ "I was unable to access these remotes: " ++