summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-11-28 17:26:15 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-11-28 17:26:15 -0400
commit949e4abc56df1fa23d426f7f86d726ad119fbf54 (patch)
treec9f1b3943a87a2c337f46b9e18e7b8639c31f1a1 /Backend
parentabf084f628a8c5f5a3685dbb2826739e3e38541e (diff)
fsck: Fix warning about not enough copies of a file, when locations are known, but are not available in currently configured remotes.
Diffstat (limited to 'Backend')
-rw-r--r--Backend/File.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Backend/File.hs b/Backend/File.hs
index 5984348b3..e3225a8b8 100644
--- a/Backend/File.hs
+++ b/Backend/File.hs
@@ -163,9 +163,9 @@ checkKey a key numcopies = do
checkKeyNumCopies :: Key -> Maybe Int -> Annex Bool
checkKeyNumCopies key numcopies = do
needed <- getNumCopies numcopies
- remotes <- Remotes.keyPossibilities key
- inannex <- inAnnex key
- let present = length remotes + if inannex then 1 else 0
+ g <- Annex.gitRepo
+ locations <- liftIO $ keyLocations g key
+ let present = length locations
if present < needed
then do
warning $ note present needed