diff options
-rw-r--r-- | shell/source/win32/SysShExec.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx index 4786e4ddedc7..910aae1c095f 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -315,7 +315,9 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa } if (uri->getScheme().equalsIgnoreAsciiCase("file")) { OUString pathname; - auto const e1 = osl::FileBase::getSystemPathFromFileURL(aCommand, pathname); + uri->clearFragment(); // getSystemPathFromFileURL fails for URLs with fragment + auto const e1 + = osl::FileBase::getSystemPathFromFileURL(uri->getUriReference(), pathname); if (e1 != osl::FileBase::E_None) { throw css::lang::IllegalArgumentException( ("XSystemShellExecute.execute, getSystemPathFromFileURL <" + aCommand |