Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal On branch : master
http://hackage.haskell.org/trac/ghc/changeset/7fb7bb6211a841a1ef0c51e747f2547aa4707283 >--------------------------------------------------------------- commit 7fb7bb6211a841a1ef0c51e747f2547aa4707283 Author: Pepe Iborra <[email protected]> Date: Mon May 21 09:42:12 2007 +0000 Unbreak package retrieval on Windows Fixes a bug in my previous filepath patch >--------------------------------------------------------------- .../src/Network/Hackage/CabalInstall/Update.hs | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cabal-install/src/Network/Hackage/CabalInstall/Update.hs b/cabal-install/src/Network/Hackage/CabalInstall/Update.hs index 7899fe6..c54f250 100644 --- a/cabal-install/src/Network/Hackage/CabalInstall/Update.hs +++ b/cabal-install/src/Network/Hackage/CabalInstall/Update.hs @@ -25,7 +25,7 @@ import Distribution.Verbosity import System.FilePath ((</>), joinPath, addExtension, takeExtension) import Control.Monad (liftM) -import Data.List (isSuffixOf) +import Data.List (intersperse, isSuffixOf) import Data.Version (showVersion) -- | 'update' downloads the package list from all known servers @@ -60,7 +60,9 @@ parsePkg server description = -- | Generate the URL of the tarball for a given package. pkgURL :: PackageIdentifier -> String -> String -pkgURL pkg base = joinPath [base, pkgName pkg, showVersion (pkgVersion pkg), showPackageId pkg] `addExtension` ".tar.gz" +pkgURL pkg base = joinWith "/" [base, pkgName pkg, showVersion (pkgVersion pkg), showPackageId pkg] + ++ ".tar.gz" + where joinWith tok = concat . intersperse tok concatMapM :: (Monad m) => [a] -> (a -> m [b]) -> m [b] concatMapM amb f = liftM concat (mapM f amb) _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
