Resolve the XDG user data dir per the basedir spec. Don't derive from wxStandardPaths::GetUserDataDir() — wx returns "$HOME/. " for aMule (legacy dot-prefixed dir), not the canonical XDG location, so any path arithmetic on top of it lands in the wrong tree.
| 67 | // aMule (legacy dot-prefixed dir), not the canonical XDG location, so |
| 68 | // any path arithmetic on top of it lands in the wrong tree. |
| 69 | wxString GetUserDataHome() |
| 70 | { |
| 71 | const char* xdg = getenv("XDG_DATA_HOME"); |
| 72 | if (xdg && *xdg) { |
| 73 | return wxString::FromUTF8(xdg); |
| 74 | } |
| 75 | return wxFileName::GetHomeDir() + wxT("/.local/share"); |
| 76 | } |
| 77 | |
| 78 | wxString GetUserApplicationsDir() |
| 79 | { |
no outgoing calls
no test coverage detected