shell/source/win32/SysShExec.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 0620d7e6a98a34d526447a7e7fd597d364814bdf Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Aug 1 10:52:12 2019 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Aug 19 22:13:53 2019 +0200 tdf#126641: don't fail on file URLs with fragment This only fixes part that the URL refuses to open the target file. Honoring fragment isn't fixed here, since it's the system call to ShellExecuteExW that in this case internally converts the file URL into a system path, and strips the fragment from it. Regression from commit d59ec4cd1660410fa1b18c50d2d83b1417a82ddc. Change-Id: I6c9ed27e9a5bd7f2780dd3be96f816a6e825e043 Reviewed-on: https://gerrit.libreoffice.org/76778 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 2207269a84c7c9920af3385b837ce67978c720b4) Reviewed-on: https://gerrit.libreoffice.org/77730 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx index 33554bd5608f..c30816816b59 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -320,7 +320,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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits