Redefine splitDrive "/d" to be ("","/d") - follows from the /c not being absolute
authorNeil Mitchell <unknown>
Mon, 14 Jan 2008 02:23:47 +0000 (02:23 +0000)
committerNeil Mitchell <unknown>
Mon, 14 Jan 2008 02:23:47 +0000 (02:23 +0000)
System/FilePath/Internal.hs

index efdd73c..50b7728 100644 (file)
@@ -302,7 +302,7 @@ isLetter x = (x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z')
 -- > Windows: splitDrive "\\\\?\\UNC\\shared\\file" == ("\\\\?\\UNC\\shared\\","file")
 -- > Windows: splitDrive "\\\\?\\UNCshared\\file" == ("\\\\?\\","UNCshared\\file")
 -- > Windows: splitDrive "\\\\?\\d:\\file" == ("\\\\?\\d:\\","file")
--- > Windows: splitDrive "/d" == ("/","d")
+-- > Windows: splitDrive "/d" == ("","/d")
 -- > Posix:   splitDrive "/test" == ("/","test")
 -- > Posix:   splitDrive "//test" == ("//","test")
 -- > Posix:   splitDrive "test/file" == ("","test/file")
@@ -319,8 +319,6 @@ splitDrive x | isJust y = fromJust y
 splitDrive x | isJust y = fromJust y
     where y = readDriveShare x
 
-splitDrive (x:xs) | isPathSeparator x = addSlash [x] xs
-
 splitDrive x = ("",x)
 
 addSlash :: FilePath -> FilePath -> (FilePath, FilePath)