WUtil: New function wuserdatapath() to get path for application data

Returns the path in the user's GNUstep library: ~/GNUstep/Library
This commit is contained in:
John D Pell authored and Carlos R. Mafra committed 2021-08-10 09:42:43 +01:00
1 parent 7e1cdf2d59
commit 1e45ff2305
2 files changed
+14

No files matched your search

+13
View File
@@ -81,6 +81,19 @@ const char *wusergnusteppath()
return path;
}
const char *wuserdatapath(void)
{
static char *path = NULL;
if (path)
/* Value have been already computed, re-use it */
return path;
path = wstrconcat(wusergnusteppath(), "/" USERDATA_SUBDIR);
return path;
}
char *wdefaultspathfordomain(const char *domain)
{
char *path;