summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sal/osl/w32/process.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 8c3e1169116d..529b73a27b97 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -275,8 +275,8 @@ static rtl_uString ** osl_createCommandArgs_Impl (int argc, char **)
::osl::LongPathBuffer< sal_Unicode > aBuffer( MAX_LONG_PATH );
DWORD dwResult = 0;
- dwResult = SearchPath (
- 0, reinterpret_cast<LPCWSTR>(ppArgs[0]->buffer), L".exe", aBuffer.getBufSizeInSymbols(), ::osl::mingw_reinterpret_cast<LPWSTR>(aBuffer), 0);
+ dwResult = GetModuleFileName (
+ 0, ::osl::mingw_reinterpret_cast<LPWSTR>(aBuffer), aBuffer.getBufSizeInSymbols());
if ((0 < dwResult) && (dwResult < aBuffer.getBufSizeInSymbols()))
{
/* Replace argv[0] with its absolute path */