use XDG functions from the directory pakage

master
Michele Guerini Rocco 2019-11-06 16:51:11 +01:00
parent 5108b035a4
commit 101f5c06af
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450
2 changed files with 5 additions and 5 deletions

View File

@ -32,10 +32,10 @@ executable breve
other-extensions: OverloadedStrings
build-depends: base >=4.8 && <5.0,
warp, warp-tls, tls, blaze-html, blaze-markup,
servant-server, servant, servant-blaze, http-api-data,
wai, wai-extra, streaming-commons,
servant-server, servant, servant-blaze,
wai, wai-extra, streaming-commons, http-api-data,
transformers, mtl,
text, aeson, bytestring, binary,
hashtables, cryptohash, random,
xdg-basedir, configurator, directory
configurator, directory
ghc-options: -threaded -O2

View File

@ -41,9 +41,9 @@ settings :: Maybe FilePath -> IO AppSettings
settings path = do
configPath <- case path of
Just path -> return path
Nothing -> getUserConfigFile "breve" ""
Nothing -> getXdgDirectory XdgConfig "breve"
urlsPath <- getUserDataFile "breve" ""
urlsPath <- getXdgDirectory XdgData "breve"
config <- load [Required configPath]
host <- lookupDefault "localhost" config "hostname"