Windows: include= and exclude= containing '/' will also match filenames that are written using '\'
And vice-versa, but it's better to use '/' for portability. Notably, standardPreferredContent contains "archive/*" and that might not match if the filename ends up coming in with the slashes the other way around.
This commit is contained in:
parent
e914cb0777
commit
6b13574827
7 changed files with 49 additions and 17 deletions
4
Limit.hs
4
Limit.hs
|
@ -115,7 +115,7 @@ limitExclude glob = Right $ MatchFiles
|
|||
matchGlobFile :: String -> MatchInfo -> Annex Bool
|
||||
matchGlobFile glob = go
|
||||
where
|
||||
cglob = compileGlob glob CaseSensative -- memoized
|
||||
cglob = compileGlob glob CaseSensative (GlobFilePath True) -- memoized
|
||||
go (MatchingFile fi) = pure $ matchGlob cglob (fromRawFilePath (matchFile fi))
|
||||
go (MatchingInfo p) = pure $ matchGlob cglob (fromRawFilePath (providedFilePath p))
|
||||
go (MatchingUserInfo p) = matchGlob cglob <$> getUserInfo (userProvidedFilePath p)
|
||||
|
@ -166,7 +166,7 @@ matchMagic _limitname querymagic selectprovidedinfo selectuserprovidedinfo (Just
|
|||
, matchNeedsLocationLog = False
|
||||
}
|
||||
where
|
||||
cglob = compileGlob glob CaseSensative -- memoized
|
||||
cglob = compileGlob glob CaseSensative (GlobFilePath False) -- memoized
|
||||
go (MatchingKey _ _) = pure False
|
||||
go (MatchingFile fi) = case contentFile fi of
|
||||
Just f -> catchBoolIO $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue