summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/source/win32/SysShExec.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 3c577df58510..57777f7330d1 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -304,7 +304,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