diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-28 17:26:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-28 17:26:15 -0400 |
commit | 949e4abc56df1fa23d426f7f86d726ad119fbf54 (patch) | |
tree | c9f1b3943a87a2c337f46b9e18e7b8639c31f1a1 | |
parent | abf084f628a8c5f5a3685dbb2826739e3e38541e (diff) |
fsck: Fix warning about not enough copies of a file, when locations are known, but are not available in currently configured remotes.
-rw-r--r-- | Backend/File.hs | 6 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 5 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 diff --git a/debian/changelog b/debian/changelog index 34e1757df..ad9c00f53 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ git-annex (0.10) UNRELEASED; urgency=low to control the number of copies to retain of different types of files. * Bugfix: Always correctly handle gitattributes when in a subdirectory of the repository. + * fsck: Fix warning about not enough copies of a file, when locations + are known, but are not available in currently configured remotes. -- Joey Hess <joeyh@debian.org> Sun, 28 Nov 2010 14:19:15 -0400 |