diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-06 17:19:29 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-06 17:45:47 -0400 |
commit | 3623d831d193d029a35aac81571d67768b176534 (patch) | |
tree | 23cf930ca5069a7e985ef4f8cc044aec7e9610ee /Command/Fsck.hs | |
parent | 6f98fd53914b2490e866a2613e86b93f689034bf (diff) |
refactor
Diffstat (limited to 'Command/Fsck.hs')
-rw-r--r-- | Command/Fsck.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs index bad60d30d..529a5015a 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -10,7 +10,6 @@ module Command.Fsck where import Control.Monad (when) import Control.Monad.State (liftIO) import System.Directory -import Data.List import System.Posix.Files import Command @@ -124,10 +123,7 @@ checkKeySize key = do checkKeyNumCopies :: Key -> Maybe FilePath -> Maybe Int -> Annex Bool checkKeyNumCopies key file numcopies = do needed <- getNumCopies numcopies - locations <- keyLocations key - untrusted <- trustGet UnTrusted - let untrustedlocations = intersect untrusted locations - let safelocations = filter (`notElem` untrusted) locations + (untrustedlocations, safelocations) <- trustPartition UnTrusted =<< keyLocations key let present = length safelocations if present < needed then do |