ooo-build r12623 - in trunk: . patches/dev300



Author: thorstenb
Date: Wed May 21 15:57:57 2008
New Revision: 12623
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12623&view=rev

Log:
	* patches/dev300/sal-xdg-config-dir.diff: honour XDG_CONFIG_HOME
	envvar, if present. This is in accordance to
	http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
	* patches/dev300/apply: added aforementioned patch



Added:
   trunk/patches/dev300/sal-xdg-config-dir.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Wed May 21 15:57:57 2008
@@ -2325,6 +2325,9 @@
 # TODO file up-stream
 lockfile-less-symbols.diff, jholesov
 
+# adhere to
+# http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
+sal-xdg-config-dir.diff, thorsten
 
 [ InternalMesaHeaders ]
 internal-mesa-headers-config_office.diff, fridrich

Added: trunk/patches/dev300/sal-xdg-config-dir.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sal-xdg-config-dir.diff	Wed May 21 15:57:57 2008
@@ -0,0 +1,18 @@
+--- sal/osl/unx/security.c	10 Apr 2008 11:12:04 -0000	1.27
++++ sal/osl/unx/security.c	21 May 2008 15:49:31 -0000
+@@ -787,7 +787,14 @@ sal_Bool SAL_CALL osl_getConfigDir(oslSe
+ 
+ static sal_Bool SAL_CALL osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax)
+ {
+-	return (osl_psz_getHomeDir(Security, pszDirectory, nMax));
++    sal_Char *pStr = getenv("XDG_CONFIG_HOME");
++    
++    if ((pStr == NULL) || (strlen(pStr) == 0) ||
++        (access(pStr, 0) != 0))
++        return (osl_psz_getHomeDir(Security, pszDirectory, nMax));
++
++    strncpy(pszDirectory, pStr, nMax);
++    return sal_True;
+ }
+ 
+ #else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]