diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-21 13:37:09 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-21 13:37:09 -0400 |
commit | b6b368ed036f2e34ee4b7d39e5b41b1ba2d0a76c (patch) | |
tree | 9d84826cd348e10252daf1219cbb012c80e1bdf4 /Utility/Path.hs | |
parent | b9e4fb7989e1644001c67c7cccd18ba5927f39db (diff) |
remove absNormPathUnix, using my absPathFrom replacement
Diffstat (limited to 'Utility/Path.hs')
-rw-r--r-- | Utility/Path.hs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/Utility/Path.hs b/Utility/Path.hs index 4ff88f72e..5e035b221 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -5,7 +5,7 @@ - License: BSD-2-clause -} -{-# LANGUAGE PackageImports, CPP #-} +{-# LANGUAGE CPP #-} module Utility.Path where @@ -24,7 +24,6 @@ import System.Posix.Files import Utility.Exception #endif -import qualified "MissingH" System.Path as MissingH import Utility.Monad import Utility.UserInfo @@ -65,18 +64,6 @@ simplifyPath path = dropTrailingPathSeparator $ absPathFrom :: FilePath -> FilePath -> FilePath absPathFrom dir path = simplifyPath (combine dir path) -{- On Windows, this converts the paths to unix-style, in order to run - - MissingH's absNormPath on them. Resulting path will use / separators. -} -absNormPathUnix :: FilePath -> FilePath -> Maybe FilePath -#ifndef mingw32_HOST_OS -absNormPathUnix dir path = MissingH.absNormPath dir path -#else -absNormPathUnix dir path = todos <$> MissingH.absNormPath (fromdos dir) (fromdos path) - where - fromdos = replace "\\" "/" - todos = replace "/" "\\" -#endif - {- takeDirectory "foo/bar/" is "foo/bar". This instead yields "foo" -} parentDir :: FilePath -> FilePath parentDir = takeDirectory . dropTrailingPathSeparator |