Improve file ordering behavior when one parameter is "." and other parameters are other directories
eg, `git-annex get . ..` used to order the files strangly, because it did not realize that when git ls-files output eg "foo", that should be grouped with the first set of files and not the second set. Fixed by making dirContains "." "./foo" = True which makes sense, because dirContains ".." "../foo" = True
This commit is contained in:
parent
14897ec8e2
commit
444d5591ee
2 changed files with 6 additions and 1 deletions
|
@ -113,7 +113,10 @@ prop_upFrom_basics dir
|
|||
- are all equivilant.
|
||||
-}
|
||||
dirContains :: FilePath -> FilePath -> Bool
|
||||
dirContains a b = a == b || a' == b' || (addTrailingPathSeparator a') `isPrefixOf` b'
|
||||
dirContains a b = a == b
|
||||
|| a' == b'
|
||||
|| (addTrailingPathSeparator a') `isPrefixOf` b'
|
||||
|| a' == "." && normalise ("." </> b') == b'
|
||||
where
|
||||
a' = norm a
|
||||
b' = norm b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue