From 2cdfe33a4c59c103e2d68a0fceaa688534fca573 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 4 May 2016 12:36:50 -0400 Subject: [PATCH] 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(-) diff --git a/Git/Tree.hs b/Git/Tree.hs index 00a966198b..b190def644 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)