use XDG functions from the directory pakage
This commit is contained in:
parent
5108b035a4
commit
101f5c06af
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user