diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-20 23:24:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-20 23:24:48 -0400 |
commit | 9f6b7935ddb3d5dcbe0b4b784dc8acd7288ddba6 (patch) | |
tree | 8b87227689a603d09ad9fdfd010b2a3b648c1a2f /Limit.hs | |
parent | 9d26192350b9c7b0402720f6f29c99c24748f364 (diff) |
go go gadget hlint
Diffstat (limited to 'Limit.hs')
-rw-r--r-- | Limit.hs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -69,7 +69,7 @@ addExclude glob = addLimit $ return . notExcluded addIn :: String -> Annex () addIn name = do u <- Remote.nameToUUID name - addLimit $ if name == "." then check local else check (remote u) + addLimit $ if name == "." then check inAnnex else check (remote u) where check a f = Backend.lookupFile f >>= handle a handle _ Nothing = return False @@ -77,12 +77,11 @@ addIn name = do remote u key = do us <- keyLocations key return $ u `elem` us - local key = inAnnex key {- Adds a limit to skip files not believed to have the specified number - of copies. -} addCopies :: String -> Annex () -addCopies num = do +addCopies num = case readMaybe num :: Maybe Int of Nothing -> error "bad number for --copies" Just n -> addLimit $ check n |