Author: jim
Date: Thu Jan 31 17:34:26 2019
New Revision: 1852623

URL: http://svn.apache.org/viewvc?rev=1852623&view=rev
Log:
Fix https://bz.apache.org/ooo/show_bug.cgi?id=127966 in a location where we 
know environments are setup
Set the CWD to $HOME or to /tmp as a backup on macOS

Modified:
    openoffice/trunk/main/sal/osl/unx/nlsupport.c

Modified: openoffice/trunk/main/sal/osl/unx/nlsupport.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/nlsupport.c?rev=1852623&r1=1852622&r2=1852623&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/nlsupport.c (original)
+++ openoffice/trunk/main/sal/osl/unx/nlsupport.c Thu Jan 31 17:34:26 2019
@@ -878,6 +878,9 @@ void _imp_getProcessLocale( rtl_Locale *
      * we need to update PATH on macOS. Doing it here ensures
      * that it's done but it's not the right location to be doing
      * this.
+     * 
+     * Also address https://bz.apache.org/ooo/show_bug.cgi?id=127966
+     * here as well :/
      */
     opath = getenv ( "PATH" );
     slen = strlen( "/usr/local/bin" ) + 1;
@@ -893,6 +896,14 @@ void _imp_getProcessLocale( rtl_Locale *
     setenv("PATH", npath, 1 );
     free(npath);
 
+/* https://bz.apache.org/ooo/show_bug.cgi?id=127966 */
+    opath = getenv ( "HOME" );
+    if ( opath && *opath ) {
+        chdir ( opath );
+    } else {
+        chdir ( "/tmp" );
+    }
+
 #ifdef DEBUG
     fprintf( stderr, "nlsupport.c:  _imp_getProcessLocale() returning %s as 
current locale.\n", locale );
 #endif


Reply via email to