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");
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);