#5966: getAppUserDataDirectory does not respect XDG specification
-----------------------------------------+----------------------------------
Reporter: ordcoder | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries/directory
Version: 7.4.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Incorrect result at runtime | Testcase:
Blockedby: | Blocking:
Related: |
-----------------------------------------+----------------------------------
getAppUserDataDirectory function from System.Directory module returns path
to a dot-dir under home directory. This swamps home with many hidden
directories, when there are many applications installed. There is
[http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
XDG specification] for this situation, which suggests using $XDG_DATA_HOME
environment variable.
So, getAppUserDataDirectory should behave approximately like this when
$XDG_DATA_HOME is set:
{{{
getAppUserDataDirectory appName = do
path <- getEnv "XDG_DATA_HOME"
return (path++'/':appName)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5966>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs