Commit f68d40cb authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

ghc-pkg: Drop trailing slashes in computing db paths

Test Plan: Validate, try tests in ticket

Reviewers: austin

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #12194
parent 6a5d13c4
......@@ -790,7 +790,7 @@ mungePackageDBPaths :: FilePath -> PackageDB -> PackageDB
mungePackageDBPaths top_dir db@PackageDB { packages = pkgs } =
db { packages = map (mungePackagePaths top_dir pkgroot) pkgs }
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/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment