You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ji...@apache.org on 2019/01/31 17:34:26 UTC

svn commit: r1852623 - /openoffice/trunk/main/sal/osl/unx/nlsupport.c

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