bugfix
This commit is contained in:
parent
467c4b2751
commit
c4959fee47
1 changed files with 8 additions and 6 deletions
14
Commands.hs
14
Commands.hs
|
@ -200,9 +200,9 @@ requireEnoughCopies key = do
|
||||||
findcopies n (r:rs) bad = do
|
findcopies n (r:rs) bad = do
|
||||||
result <- liftIO $ try $ haskey r
|
result <- liftIO $ try $ haskey r
|
||||||
case (result) of
|
case (result) of
|
||||||
Right True -> do
|
Right True -> findcopies (n-1) rs bad
|
||||||
findcopies (n-1) rs bad
|
Right False -> findcopies n rs bad
|
||||||
Left _ -> findcopies n rs (r:bad)
|
Left _ -> findcopies n rs (r:bad)
|
||||||
haskey r = do
|
haskey r = do
|
||||||
-- To check if a remote has a key, construct a new
|
-- To check if a remote has a key, construct a new
|
||||||
-- Annex monad and query its backend.
|
-- Annex monad and query its backend.
|
||||||
|
@ -211,9 +211,11 @@ requireEnoughCopies key = do
|
||||||
return result
|
return result
|
||||||
die bad =
|
die bad =
|
||||||
error $ "I failed to find enough other copies of: " ++
|
error $ "I failed to find enough other copies of: " ++
|
||||||
(keyFile key) ++ "\n" ++
|
(keyFile key) ++
|
||||||
"I was unable to access these remotes: " ++
|
(if (0 /= length bad) then listbad bad else "")
|
||||||
(Remotes.list bad) ++ unsafe
|
++ unsafe
|
||||||
|
listbad bad = "\nI was unable to access these remotes: " ++
|
||||||
|
(Remotes.list bad)
|
||||||
unsafe = "\n -- According to the " ++ config ++
|
unsafe = "\n -- According to the " ++ config ++
|
||||||
" setting, it is not safe to remove it!"
|
" setting, it is not safe to remove it!"
|
||||||
config = "annex.numcopies"
|
config = "annex.numcopies"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue