summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-01-26 20:08:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-01-26 20:08:37 -0400
commit3cb5cb6bf6f03ad3ef574a14ed35275916ac44b3 (patch)
tree312d30f71a63f8feb252104240f3d47599b3cb9d
parentee2e94f08703ee1b5f51bf5c2d26de141b58298c (diff)
bring back display of keys
in fsck -q, that's the only way to know what file it means
-rw-r--r--Backend/File.hs20
1 files changed, 11 insertions, 9 deletions
diff --git a/Backend/File.hs b/Backend/File.hs
index f31752d90..10304dd91 100644
--- a/Backend/File.hs
+++ b/Backend/File.hs
@@ -184,22 +184,24 @@ checkKeyNumCopies key numcopies = do
if present < needed
then do
ppuuids <- prettyPrintUUIDs untrustedlocations
- warning $ missingNote present needed ppuuids
+ warning $ missingNote (show key) present needed ppuuids
return False
else return True
where
-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!" ++
+missingNote :: String -> Int -> Int -> String -> String
+missingNote file 0 _ [] =
+ "** No known copies of " ++ file ++ " exist!"
+missingNote file 0 _ untrusted =
+ "Only these untrusted locations may have copies of " ++ file ++
+ "\n-- they could lose it at any time!" ++
"\n" ++ untrusted ++
"Back it up to trusted locations with git-annex copy."
-missingNote present needed [] =
+missingNote file present needed [] =
"Only " ++ show present ++ " of " ++ show needed ++
- " trustworthy copies of this file exist." ++
+ " trustworthy copies of " ++ file ++ " exist." ++
"\nBack it up with git-annex copy."
-missingNote present needed untrusted = missingNote present needed [] ++
+missingNote file present needed untrusted =
+ missingNote file present needed [] ++
"\nThe following untrusted copies may also exist: " ++
"\n" ++ untrusted