diff options
author | Joey Hess <joey@kitenet.net> | 2011-01-26 17:47:02 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-01-26 17:47:02 -0400 |
commit | 6b48f740f1e55b8461757bed670f29bc87e186a4 (patch) | |
tree | 1b05f017b3f0d6aef5a74e6e09fa359934feeff3 /Backend | |
parent | ba748a11989f6ba7ea1f306be99b8b3f259ede68 (diff) |
rework note
Diffstat (limited to 'Backend')
-rw-r--r-- | Backend/File.hs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Backend/File.hs b/Backend/File.hs index dea69ef9b..8c39c3f80 100644 --- a/Backend/File.hs +++ b/Backend/File.hs @@ -176,24 +176,22 @@ checkKeyNumCopies key numcopies = do if present < needed then do ppuuids <- prettyPrintUUIDs untrustedlocations - missingNote present needed ppuuids + showLongNote $ missingNote present needed ppuuids return False else return True where -missingNote :: Int -> Int -> String -> Annex () -missingNote 0 _ [] = showLongNote $ "** No known copies of this file exist!" -missingNote 0 _ untrusted = do - showLongNote $ +missingNote :: Int -> Int -> String -> String +missingNote 0 _ [] = + "** No known copies of this file exist!" +missingNote 0 _ untrusted = "Only these untrusted locations may have copies of this file!" ++ "\n" ++ untrusted ++ "Back it up to trusted locations with git-annex copy." -missingNote present needed untrusted = do - showLongNote $ +missingNote present needed [] = "Only " ++ show present ++ " of " ++ show needed ++ " trustworthy copies of this file exist." ++ "\nBack it up with git-annex copy." - when (not $ null untrusted) $ do - showLongNote $ - "\nThe following untrusted copies may also exist: " ++ - "\n" ++ untrusted +missingNote present needed untrusted = missingNote present needed [] ++ + "\nThe following untrusted copies may also exist: " ++ + "\n" ++ untrusted |