diff --git a/src/HPath.hs b/src/HPath.hs index 2c8f0c2..42e88cb 100644 --- a/src/HPath.hs +++ b/src/HPath.hs @@ -62,6 +62,7 @@ module HPath ,dropFileName ,dropTrailingPathSeparator ,dropWhileEnd + ,equalFilePath ,joinPath ,normalise ,splitDirectories @@ -499,6 +500,12 @@ isValid filepath | otherwise = True +equalFilePath :: ByteString -> ByteString -> Bool +equalFilePath p1 p2 = f p1 == f p2 + where + f x = dropTrailingPathSeparator $ normalise x + + -------------------------------------------------------------------------------- -- String based path functions