diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-20 00:10:12 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-20 00:10:12 -0400 |
commit | e8afcf6e6dcda746ed365c1b64de3b2171418830 (patch) | |
tree | e220837a41ad25eb4f722d7ae8dcabc571d26be2 /Limit.hs | |
parent | 1018c549a7e0c7442239533d0c62c83a0978f7d6 (diff) |
Improve behavior when unable to parse a preferred content expression (thanks, ion).
Fall back to "present" as the preferred conent expression, which will
not result in any content movement.
Diffstat (limited to 'Limit.hs')
-rw-r--r-- | Limit.hs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -120,7 +120,10 @@ addIn s = addLimit =<< mk {- Limit to content that is currently present on a uuid. -} limitPresent :: Maybe UUID -> MkLimit -limitPresent u _ = Right $ const $ checkKey $ \key -> do +limitPresent u _ = Right $ matchPresent u + +matchPresent :: Maybe UUID -> MatchFiles +matchPresent u _ = checkKey $ \key -> do hereu <- getUUID if u == Just hereu || isNothing u then inAnnex key |