MCPcopy Create free account
hub / github.com/amule-project/amule / GetUserDataHome

Function GetUserDataHome

src/AppImageIntegration.cpp:69–76  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
69wxString 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
78wxString GetUserApplicationsDir()
79{

Callers 2

GetUserApplicationsDirFunction · 0.85
GetUserIconsDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected