update ooo310-m15
[ooovba.git] / applied_patches / 0764-sal-xdg-config-dir.diff
blob9892a561db5410a831778aaa4b02fd4e2d484d31
1 --- sal/osl/unx/security.c 10 Apr 2008 11:12:04 -0000 1.27
2 +++ sal/osl/unx/security.c 21 May 2008 15:49:31 -0000
3 @@ -787,7 +787,14 @@ sal_Bool SAL_CALL osl_getConfigDir(oslSe
5 static sal_Bool SAL_CALL osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax)
7 - return (osl_psz_getHomeDir(Security, pszDirectory, nMax));
8 + sal_Char *pStr = getenv("XDG_CONFIG_HOME");
9 +
10 + if ((pStr == NULL) || (strlen(pStr) == 0) ||
11 + (access(pStr, 0) != 0))
12 + return (osl_psz_getHomeDir(Security, pszDirectory, nMax));
14 + strncpy(pszDirectory, pStr, nMax);
15 + return sal_True;
18 #else