From 53912aaac792be395414271906e59dec916c9a36 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 4 May 2016 12:36:50 -0400 Subject: more windows path fixes beneathSubTree can be called with both windows-style and git-style paths, so needs to normalize to windows-style. --- Git/Tree.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Git') 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) -- cgit v1.2.3