summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-25 09:13:12 +0100
committerAndras Timar <andras.timar@collabora.com>2021-10-11 00:05:59 +0200
commit34386021ed61093f0a5310955c889685b0a48642 (patch)
tree262198755aa752692f7b1d79008887295489555f
parentd7a5f25f56a8cceedd4ba4c03d0ed07f2b3e3393 (diff)
Better handling of Java files
Change-Id: Ifa662be39ac7d35241ee31956e2556b7ba3b5a02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106558 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 696739056f37430154d6333b8f7228d1c44d09b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106520 Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit ec5adc39cbea6d754ef68ab3d03fb16066b27e40)
-rw-r--r--shell/source/unix/exec/shellexec.cxx4
-rw-r--r--shell/source/win32/SysShExec.cxx3
2 files changed, 6 insertions, 1 deletions
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index 5184078b9689..c9211cd9d2ee 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -154,6 +154,10 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
{
throw css::lang::IllegalArgumentException(
"XSystemShellExecute.execute, cannot process <" + aCommand + ">", {}, 0);
+ } else if (pathname.endsWithIgnoreAsciiCase(".class")
+ || pathname.endsWithIgnoreAsciiCase(".jar"))
+ {
+ dir = true;
}
}
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 004754d6ada5..17729fcc7f7a 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -390,7 +390,8 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
}
if (!(checkExtension(ext, env)
&& checkExtension(
- ext, ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY")))
+ ext,
+ ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.CLASS;.JAR")))
{
throw css::lang::IllegalArgumentException(
"XSystemShellExecute.execute, cannot process <" + aCommand + ">", {}, 0);