[commit: ghc] master: ghc-pkg: Drop trailing slashes in computing db paths (f68d40c)
git at git.haskell.org
git at git.haskell.org
Thu Jun 30 17:58:36 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f68d40cbfc832a1dfc7742d02f76129ed80506e4/ghc
>---------------------------------------------------------------
commit f68d40cbfc832a1dfc7742d02f76129ed80506e4
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Mon Jun 20 09:25:05 2016 +0200
ghc-pkg: Drop trailing slashes in computing db paths
Test Plan: Validate, try tests in ticket
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2336
GHC Trac Issues: #12194
>---------------------------------------------------------------
f68d40cbfc832a1dfc7742d02f76129ed80506e4
utils/ghc-pkg/Main.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 1b5f5e0..e0625fe 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -790,7 +790,7 @@ mungePackageDBPaths :: FilePath -> PackageDB -> PackageDB
mungePackageDBPaths top_dir db at PackageDB { packages = pkgs } =
db { packages = map (mungePackagePaths top_dir pkgroot) pkgs }
where
- pkgroot = takeDirectory (locationAbsolute db)
+ pkgroot = takeDirectory $ dropTrailingPathSeparator (locationAbsolute db)
-- It so happens that for both styles of package db ("package.conf"
-- files and "package.conf.d" dirs) the pkgroot is the parent directory
-- ${pkgroot}/package.conf or ${pkgroot}/package.conf.d/
More information about the ghc-commits
mailing list