summaryrefslogtreecommitdiff
path: root/sal/osl/w32/process.c
diff options
context:
space:
mode:
authorHennes Rohling <hro@openoffice.org>2001-09-24 12:49:29 +0000
committerHennes Rohling <hro@openoffice.org>2001-09-24 12:49:29 +0000
commita5f016087e9e998c1d402356747997b11a0df9ef (patch)
tree609fe274d7033d7f9d73d06d5b0a8f2c405f7267 /sal/osl/w32/process.c
parent67342c73b14b6c39c9d9bfaea93e060507307f21 (diff)
#90826# Use global mutex to access Set/Get CurrentDirectory()
Diffstat (limited to 'sal/osl/w32/process.c')
-rw-r--r--sal/osl/w32/process.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sal/osl/w32/process.c b/sal/osl/w32/process.c
index e12801d58a65..fa723c610af7 100644
--- a/sal/osl/w32/process.c
+++ b/sal/osl/w32/process.c
@@ -2,9 +2,9 @@
*
* $RCSfile: process.c,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: obr $ $Date: 2001-09-12 11:32:25 $
+ * last change: $Author: hro $ $Date: 2001-09-24 13:49:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,10 +120,17 @@ oslProcessError SAL_CALL osl_setProcessLocale( rtl_Locale * pLocale )
/***************************************************************************/
+extern oslMutex g_CurrentDirectoryMutex;
+
oslProcessError SAL_CALL osl_getProcessWorkingDir( rtl_uString **pustrWorkingDir )
{
TCHAR szBuffer[MAX_PATH];
- DWORD dwLen = GetCurrentDirectory( sizeof(szBuffer) / sizeof(TCHAR), szBuffer );
+ DWORD dwLen;
+
+
+ osl_acquireMutex( g_CurrentDirectoryMutex );
+ dwLen = GetCurrentDirectory( sizeof(szBuffer) / sizeof(TCHAR), szBuffer );
+ osl_releaseMutex( g_CurrentDirectoryMutex );
if ( dwLen )
{