diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-25 09:13:12 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-12-02 15:14:59 +0100 |
commit | 1dc6340da19a1abcad11b3d919561c4780f3a30b (patch) | |
tree | b32623aa0417b988203d3cec2e16c07f69809f09 /shell/source | |
parent | ce9da7f3e75c5a29e53339645e1faf8d8687c74a (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)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107060
Tested-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'shell/source')
-rw-r--r-- | shell/source/unix/exec/shellexec.cxx | 4 | ||||
-rw-r--r-- | shell/source/win32/SysShExec.cxx | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx index 3daea4a2b18a..ad171d70888f 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shellexec.cxx @@ -150,6 +150,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 ddc222fe71cf..c4170d2f9de5 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -420,7 +420,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); |