Handle trailing path separator in package DB names (#16360)
authorKevin Buhr <buhr@asaurus.net>
Fri, 3 May 2019 23:15:44 +0000 (18:15 -0500)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Sun, 9 Jun 2019 22:42:57 +0000 (18:42 -0400)
commit9d238791862e8b128d397a1c0317986ea82ed000
treea1dd2557a5be4ea1d2548638f7d4cdd785e8b335
parentb9fe91fce5cf5ab233ab48a64e6a49caf1beced3
Handle trailing path separator in package DB names (#16360)

Package DB directories with trailing separator (provided via
GHC_PACKAGE_PATH or via -package-db) resulted in incorrect calculation of
${pkgroot} substitution variable.  Keep the trailing separator while
resolving as directory or file, but remove it before dropping the last
path component with takeDirectory.

Closes #16360.
compiler/main/Packages.hs
testsuite/tests/driver/T16360/Hello.hs [new file with mode: 0644]
testsuite/tests/driver/T16360/Makefile [new file with mode: 0644]
testsuite/tests/driver/T16360/all.T [new file with mode: 0644]
testsuite/tests/driver/T16360/test/Test.hs [new file with mode: 0644]
testsuite/tests/driver/T16360/test/test.pkg [new file with mode: 0644]