getAppUserDataDirectory does not respect XDG specification
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 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)
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/directory |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |