scripting/source/pyprov/pythonscript.py | 4 +++- shell/source/win32/SysShExec.cxx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
New commits: commit b16e5b8f4d7fdc17e6b610c94a8d3d93274adfaf Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Sat Aug 3 16:37:48 2019 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Wed Aug 7 23:19:58 2019 +0200 keep name percent-encoded Change-Id: I470c4b24192c3e3c9b556a9bbb3b084359e0033b Reviewed-on: https://gerrit.libreoffice.org/77006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 315c51731384230194af26b86a976bf5d06c9dcc) Reviewed-on: https://gerrit.libreoffice.org/77090 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index f1b2bfc75ee3..64e1337d642e 100644 --- a/scripting/source/pyprov/pythonscript.py +++ b/scripting/source/pyprov/pythonscript.py @@ -219,7 +219,9 @@ class MyUriHelper: # path to the .py file + "$functionname, arguments, etc xStorageUri = self.m_uriRefFac.parse(scriptURI) - sStorageUri = xStorageUri.getName().replace( "|", "/" ); + # getName will apply url-decoding to the name, so encode back + sStorageUri = xStorageUri.getName().replace("%", "%25") + sStorageUri = sStorageUri.replace( "|", "/" ) # path to the .py file, relative to the base sFileUri = sStorageUri[0:sStorageUri.find("$")] commit f88a9abd2516dd750f94df4a160ac82db95d5e73 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Aug 1 10:52:12 2019 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Wed Aug 7 23:19:43 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/76848 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit dd2b7919058fc0e23a7117d39110d3ecaaad1fb2) Reviewed-on: https://gerrit.libreoffice.org/76881 Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit 72861eaf7cf9af3e7764b13d9e74edc5548806d2) Reviewed-on: https://gerrit.libreoffice.org/77089 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx index da08f6322bb3..8a926214ba59 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -290,7 +290,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