summaryrefslogtreecommitdiff
path: root/utils/ghc-pkg/Main.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-06-15 15:17:40 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-06-15 15:17:40 +0000
commit5d5410209524eb3e3b39619ba398dbb924ae91c0 (patch)
tree579e167934d2d371a541dcd419a1774b7337585a /utils/ghc-pkg/Main.hs
parent9ec14a9e16a761774b60c31b35bd1ba36cb74f00 (diff)
downloadhaskell-5d5410209524eb3e3b39619ba398dbb924ae91c0.tar.gz
it should be an error to use relative directories (#4134)
Diffstat (limited to 'utils/ghc-pkg/Main.hs')
-rw-r--r--utils/ghc-pkg/Main.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 03a547d4c1..e110cb4b3c 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -1296,6 +1296,9 @@ checkDir warn_only thisfield d
| "$topdir" `isPrefixOf` d = return ()
| "$httptopdir" `isPrefixOf` d = return ()
-- can't check these, because we don't know what $(http)topdir is
+ | isRelative d = verror ForceFiles $
+ thisfield ++ ": " ++ d ++ " is a relative path"
+ -- relative paths don't make any sense; #4134
| otherwise = do
there <- liftIO $ doesDirectoryExist d
when (not there) $