From d802f73243adb29b4436d0f0fd80660d78dacc58 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Feb 2014 16:59:39 -0400 Subject: Revert "work around absNormPath not working on Windows" This reverts commit 595e9a41cedbed40dfc6680d34ef6de5e3a2ff8e. That caused 2 other test cases to fail. Windows path slash issues are horrible. --- Utility/Path.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Utility/Path.hs') diff --git a/Utility/Path.hs b/Utility/Path.hs index 0b15e7421..44ac72f06 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -21,10 +21,10 @@ import Control.Applicative import Data.Char import qualified System.FilePath.Posix as Posix #else +import qualified "MissingH" System.Path as MissingH import System.Posix.Files #endif -import qualified "MissingH" System.Path as MissingH import Utility.Monad import Utility.UserInfo @@ -34,15 +34,15 @@ import Utility.UserInfo - - On Unix, collapses and normalizes ".." etc in the path. May return Nothing - if the path cannot be normalized. + - + - MissingH's absNormPath does not work on Windows, so on Windows + - no normalization is done. -} absNormPath :: FilePath -> FilePath -> Maybe FilePath #ifndef mingw32_HOST_OS absNormPath dir path = MissingH.absNormPath dir path #else -absNormPath dir path = todos <$> MissingH.absNormPath (fromdos dir) (fromdos path) - where - fromdos = replace "\\" "/" - todos = replace "/" "\\" +absNormPath dir path = Just $ combine dir path #endif {- Returns the parent directory of a path. -- cgit v1.2.3