add key to FileInfo
MatchingKey is not the thing to use when matching on actual worktreee files. Fix reversion in 8.20201116 that made include= and exclude= in preferred/required content expressions match a path relative to the current directory, rather than the path from the top of the repository.
This commit is contained in:
parent
205a837e8a
commit
01527b21d8
13 changed files with 48 additions and 13 deletions
8
Limit.hs
8
Limit.hs
|
@ -535,9 +535,11 @@ addAccessedWithin duration = do
|
|||
secs = fromIntegral (durationSeconds duration)
|
||||
|
||||
lookupFileKey :: FileInfo -> Annex (Maybe Key)
|
||||
lookupFileKey fi = case contentFile fi of
|
||||
Just f -> lookupKey f
|
||||
Nothing -> return Nothing
|
||||
lookupFileKey fi = case matchKey fi of
|
||||
Just k -> return (Just k)
|
||||
Nothing -> case contentFile fi of
|
||||
Just f -> lookupKey f
|
||||
Nothing -> return Nothing
|
||||
|
||||
checkKey :: (Key -> Annex Bool) -> MatchInfo -> Annex Bool
|
||||
checkKey a (MatchingFile fi) = lookupFileKey fi >>= maybe (return False) a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue