[commit: packages/filepath] master: joinDrive=combineAlways (e0a3634)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 11:35:12 UTC 2015


Repository : ssh://git@git.haskell.org/filepath

On branch  : master
Link       : http://git.haskell.org/packages/filepath.git/commitdiff/e0a363478b840fc1788dcbc9dce0f939dc2e30b3

>---------------------------------------------------------------

commit e0a363478b840fc1788dcbc9dce0f939dc2e30b3
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Thu Oct 23 19:14:24 2014 +0200

    joinDrive=combineAlways


>---------------------------------------------------------------

e0a363478b840fc1788dcbc9dce0f939dc2e30b3
 System/FilePath/Internal.hs | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/System/FilePath/Internal.hs b/System/FilePath/Internal.hs
index 417feec..80817cc 100644
--- a/System/FilePath/Internal.hs
+++ b/System/FilePath/Internal.hs
@@ -383,12 +383,7 @@ readDriveShareName name = addSlash a b
 -- > Windows: joinDrive "\\\\share" "foo" == "\\\\share\\foo"
 -- > Windows: joinDrive "/:" "foo" == "/:\\foo"
 joinDrive :: FilePath -> FilePath -> FilePath
-joinDrive a b | null a = b
-              | null b = a
-              | hasTrailingPathSeparator a = a ++ b
-              | otherwise = case a of
-                                [a1,':'] | isWindows && isLetter a1 -> a ++ b
-                                _ -> a ++ [pathSeparator] ++ b
+joinDrive = combineAlways
 
 -- | Get the drive from a filepath.
 --



More information about the ghc-commits mailing list