diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-06-20 09:25:05 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-06-30 20:02:23 +0200 |
commit | f68d40cbfc832a1dfc7742d02f76129ed80506e4 (patch) | |
tree | 7e6f1c84bef3e89b539ae68217aed042c19445c7 /utils/ghc-pkg | |
parent | 6a5d13c4ade5bbb84873970065a1acd1546f6c31 (diff) | |
download | haskell-f68d40cbfc832a1dfc7742d02f76129ed80506e4.tar.gz |
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
Diffstat (limited to 'utils/ghc-pkg')
-rw-r--r-- | utils/ghc-pkg/Main.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index 1b5f5e08f7..e0625fec80 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@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/ |