Fix some path names for Windows #195

This commit is contained in:
Michael Snoyman 2014-03-17 07:18:43 -07:00
parent 84edb38325
commit 622c2b8c63

View File

@ -123,6 +123,9 @@ loadPackageDB settings coreMap core deps = do
findCabalAndAddPackage tarball p v pdb =
loop
where
fixPath '\\' = '/'
fixPath c = c
expectedPath = let PackageName p' = p in concat
[ packageVersionString (p, v)
, "/"
@ -142,7 +145,7 @@ loadPackageDB settings coreMap core deps = do
, show e
]
loop (Tar.Next entry rest)
| Tar.entryPath entry == expectedPath =
| map fixPath (Tar.entryPath entry) == expectedPath =
case Tar.entryContent entry of
Tar.NormalFile bs _ -> addPackage p v bs pdb
_ -> error $ concat