diff options
author | Gauvain 'GovanifY' Roussel-Tarbouriech <gauvain@govanify.com> | 2020-12-05 23:02:44 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-18 13:46:19 -0500 |
commit | 763d28551de32377a1dca8bdde02979e3686f400 (patch) | |
tree | b96de6da511d3fc2f7b29260d8250afb787df758 /utils/ghc-pkg | |
parent | 2adfb404111c220ef4df0206d9cda20c2fe5db46 (diff) | |
download | haskell-763d28551de32377a1dca8bdde02979e3686f400.tar.gz |
directory: ensure xdg compliance (Fix #6077)
Diffstat (limited to 'utils/ghc-pkg')
-rw-r--r-- | utils/ghc-pkg/Main.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index a0fc8772ac..fc33f3ce37 100644 --- a/utils/ghc-pkg/Main.hs +++ b/utils/ghc-pkg/Main.hs @@ -58,8 +58,8 @@ import Distribution.Simple.Utils (toUTF8BS, writeUTF8File, readUTF8File) import qualified Data.Version as Version import System.FilePath as FilePath import qualified System.FilePath.Posix as FilePath.Posix -import System.Directory ( getAppUserDataDirectory, createDirectoryIfMissing, - getModificationTime ) +import System.Directory ( getXdgDirectory, createDirectoryIfMissing, + getModificationTime, XdgDirectory ( XdgData ) ) import Text.Printf import Prelude @@ -634,8 +634,8 @@ getPkgDatabases verbosity mode use_user use_cache expand_vars my_flags = do let no_user_db = FlagNoUserDb `elem` my_flags -- get the location of the user package database, and create it if necessary - -- getAppUserDataDirectory can fail (e.g. if $HOME isn't set) - e_appdir <- tryIO $ getAppUserDataDirectory "ghc" + -- getXdgDirectory can fail (e.g. if $HOME isn't set) + e_appdir <- tryIO $ getXdgDirectory XdgData "ghc" mb_user_conf <- case [ f | FlagUserConfig f <- my_flags ] of |