diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-05-04 12:36:50 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-05-04 12:36:50 -0400 |
commit | 53912aaac792be395414271906e59dec916c9a36 (patch) | |
tree | cfac4b8d0219e7402e7eec5f3e2cf0303d54c7a6 /Git | |
parent | fa1444365ed884b5885b88dcc0d0500addbd4e30 (diff) |
more windows path fixes
beneathSubTree can be called with both windows-style and git-style paths,
so needs to normalize to windows-style.
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Tree.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Git/Tree.hs b/Git/Tree.hs index 00a966198..b190def64 100644 --- a/Git/Tree.hs +++ b/Git/Tree.hs @@ -256,7 +256,7 @@ inTree :: (GitPath t, GitPath f) => t -> f -> Bool inTree t f = gitPath t == takeDirectory (gitPath f) beneathSubTree :: (GitPath t, GitPath f) => t -> f -> Bool -beneathSubTree t f = prefix `isPrefixOf` gitPath f +beneathSubTree t f = prefix `isPrefixOf` normalise (gitPath f) where tp = gitPath t - prefix = if null tp then tp else addTrailingPathSeparator tp + prefix = if null tp then tp else addTrailingPathSeparator (normalise tp) |