rework note
This commit is contained in:
parent
ba748a1198
commit
6b48f740f1
1 changed files with 9 additions and 11 deletions
|
@ -176,24 +176,22 @@ checkKeyNumCopies key numcopies = do
|
||||||
if present < needed
|
if present < needed
|
||||||
then do
|
then do
|
||||||
ppuuids <- prettyPrintUUIDs untrustedlocations
|
ppuuids <- prettyPrintUUIDs untrustedlocations
|
||||||
missingNote present needed ppuuids
|
showLongNote $ missingNote present needed ppuuids
|
||||||
return False
|
return False
|
||||||
else return True
|
else return True
|
||||||
where
|
where
|
||||||
|
|
||||||
missingNote :: Int -> Int -> String -> Annex ()
|
missingNote :: Int -> Int -> String -> String
|
||||||
missingNote 0 _ [] = showLongNote $ "** No known copies of this file exist!"
|
missingNote 0 _ [] =
|
||||||
missingNote 0 _ untrusted = do
|
"** No known copies of this file exist!"
|
||||||
showLongNote $
|
missingNote 0 _ untrusted =
|
||||||
"Only these untrusted locations may have copies of this file!" ++
|
"Only these untrusted locations may have copies of this file!" ++
|
||||||
"\n" ++ untrusted ++
|
"\n" ++ untrusted ++
|
||||||
"Back it up to trusted locations with git-annex copy."
|
"Back it up to trusted locations with git-annex copy."
|
||||||
missingNote present needed untrusted = do
|
missingNote present needed [] =
|
||||||
showLongNote $
|
|
||||||
"Only " ++ show present ++ " of " ++ show needed ++
|
"Only " ++ show present ++ " of " ++ show needed ++
|
||||||
" trustworthy copies of this file exist." ++
|
" trustworthy copies of this file exist." ++
|
||||||
"\nBack it up with git-annex copy."
|
"\nBack it up with git-annex copy."
|
||||||
when (not $ null untrusted) $ do
|
missingNote present needed untrusted = missingNote present needed [] ++
|
||||||
showLongNote $
|
"\nThe following untrusted copies may also exist: " ++
|
||||||
"\nThe following untrusted copies may also exist: " ++
|
"\n" ++ untrusted
|
||||||
"\n" ++ untrusted
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue