Author: jim Date: Thu Jan 31 17:37:28 2019 New Revision: 1852625 URL: http://svn.apache.org/viewvc?rev=1852625&view=rev Log: Merge r1852623, r1852624 from trunk:
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 Additional env setup for https://bz.apache.org/ooo/show_bug.cgi?id=127966 fix Reviewed by: jim Modified: openoffice/branches/AOO42X/ (props changed) openoffice/branches/AOO42X/main/odk/source/unoapploader/unx/unoapploader.c openoffice/branches/AOO42X/main/sal/osl/unx/nlsupport.c Propchange: openoffice/branches/AOO42X/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 31 17:37:28 2019 @@ -9,4 +9,4 @@ /openoffice/branches/ia2:1417739-1541842 /openoffice/branches/ooxml-osba:1546391,1546395,1546574,1546934,1547030,1547392,1551920,1551954,1551958,1552283 /openoffice/branches/rejuvenate01:1480411,1534063,1534098,1536312,1549902,1560617 -/openoffice/trunk:1851110-1851111,1851115,1851118,1851121,1851206,1851214-1851215,1851443,1851449,1851464,1851575,1851634,1851637,1851639,1851715,1851813,1851987,1852008,1852010,1852029,1852046,1852174,1852187,1852190,1852430,1852438 +/openoffice/trunk:1851110-1851111,1851115,1851118,1851121,1851206,1851214-1851215,1851443,1851449,1851464,1851575,1851634,1851637,1851639,1851715,1851813,1851987,1852008,1852010,1852029,1852046,1852174,1852187,1852190,1852430,1852438,1852623-1852624 Modified: openoffice/branches/AOO42X/main/odk/source/unoapploader/unx/unoapploader.c URL: http://svn.apache.org/viewvc/openoffice/branches/AOO42X/main/odk/source/unoapploader/unx/unoapploader.c?rev=1852625&r1=1852624&r2=1852625&view=diff ============================================================================== --- openoffice/branches/AOO42X/main/odk/source/unoapploader/unx/unoapploader.c (original) +++ openoffice/branches/AOO42X/main/odk/source/unoapploader/unx/unoapploader.c Thu Jan 31 17:37:28 2019 @@ -220,6 +220,14 @@ int main( int argc, char *argv[] ) } strcat( envstr, "/usr/local/bin" ); /* We are adding at the end */ putenv( envstr ); + + /* https://bz.apache.org/ooo/show_bug.cgi?id=127966 */ + value = getenv ( "HOME" ); + if ( value && *value ) { + chdir ( value ); + } else { + chdir ( "/tmp" ); + } #endif } else Modified: openoffice/branches/AOO42X/main/sal/osl/unx/nlsupport.c URL: http://svn.apache.org/viewvc/openoffice/branches/AOO42X/main/sal/osl/unx/nlsupport.c?rev=1852625&r1=1852624&r2=1852625&view=diff ============================================================================== --- openoffice/branches/AOO42X/main/sal/osl/unx/nlsupport.c (original) +++ openoffice/branches/AOO42X/main/sal/osl/unx/nlsupport.c Thu Jan 31 17:37:28 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
