From 6b48f740f1e55b8461757bed670f29bc87e186a4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 26 Jan 2011 17:47:02 -0400 Subject: rework note --- Backend/File.hs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'Backend') 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 -- cgit v1.2.3