From 9e37898e2186c8f7bb71a5d2bd7a02303410b363 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 23 Jun 2011 08:48:13 -0400 Subject: remove stateDir --- Command.hs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'Command.hs') diff --git a/Command.hs b/Command.hs index 228c1f40e..129233d74 100644 --- a/Command.hs +++ b/Command.hs @@ -22,7 +22,6 @@ import qualified Backend import Messages import qualified Annex import qualified GitRepo as Git -import Locations import Utility import Types.Key @@ -181,17 +180,15 @@ withNothing _ _ = error "This command takes no parameters." backendPairs :: CommandSeekBackendFiles backendPairs a files = liftM (map a) $ Backend.chooseBackends files -{- Filter out files from the state directory, and those matching the - - exclude glob pattern, if it was specified. -} +{- Filter out files those matching the exclude glob pattern, + - if it was specified. -} filterFiles :: [FilePath] -> Annex [FilePath] filterFiles l = do - let l' = filter notState l exclude <- Annex.getState Annex.exclude if null exclude - then return l' - else return $ filter (notExcluded $ wildsRegex exclude) l' + then return l + else return $ filter (notExcluded $ wildsRegex exclude) l where - notState f = not $ stateDir `isPrefixOf` f notExcluded r f = isNothing $ match r f [] wildsRegex :: [String] -> Regex -- cgit v1.2.3