[commit: Cabal] master: Use non-Char8 ByteString.readFile for reading 00-index.tar.gz (f90f212)
Ian Lynagh
igloo at earth.li
Fri Jun 24 02:05:53 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/f90f21203098e8ee7c966057bd51dca8380dc701
>---------------------------------------------------------------
commit f90f21203098e8ee7c966057bd51dca8380dc701
Author: Duncan Coutts <duncan at haskell.org>
Date: Sun Jan 17 11:38:49 2010 +0000
Use non-Char8 ByteString.readFile for reading 00-index.tar.gz
Was showing up on windows as an error decompressing after cabal update.
Thanks to Tamar Christina for reporting and helping track down the bug.
>---------------------------------------------------------------
cabal-install/Distribution/Client/Update.hs | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cabal-install/Distribution/Client/Update.hs b/cabal-install/Distribution/Client/Update.hs
index 428954e..6288b34 100644
--- a/cabal-install/Distribution/Client/Update.hs
+++ b/cabal-install/Distribution/Client/Update.hs
@@ -33,7 +33,8 @@ import Distribution.Simple.Utils
import Distribution.Verbosity
( Verbosity )
-import qualified Data.ByteString.Lazy.Char8 as BS
+import qualified Data.ByteString.Lazy as BS
+import qualified Data.ByteString.Lazy.Char8 as BS.Char8
import qualified Codec.Compression.GZip as GZip (decompress)
import qualified Data.Map as Map
import System.FilePath (dropExtension)
@@ -56,7 +57,7 @@ updateRepo verbosity repo = case repoKind repo of
notice verbosity $ "Downloading the latest package list from "
++ remoteRepoName remoteRepo
indexPath <- downloadIndex verbosity remoteRepo (repoLocalDir repo)
- writeFileAtomic (dropExtension indexPath) . BS.unpack
+ writeFileAtomic (dropExtension indexPath) . BS.Char8.unpack
. GZip.decompress
=<< BS.readFile indexPath
More information about the Cvs-libraries
mailing list