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.
This commit is contained in:
parent
9aa31b71f3
commit
ed30b81e2c
4 changed files with 38 additions and 12 deletions
5
Limit.hs
5
Limit.hs
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue