diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-25 09:13:12 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-11-25 14:23:59 +0100 |
commit | 5afef364af6a40c20e56ae97161fdffd17cee080 (patch) | |
tree | 88968c325bb5a8c114d3578516ea91b348316f88 /shell/source | |
parent | c3b94e1d3f12f9f8a58c3f33bdb18d3a0990ea79 (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/+/106521
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 7d4e9cb36fb6..bbd614a66355 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shellexec.cxx @@ -136,6 +136,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 4cf00a70e3ed..660729339521 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -336,7 +336,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); |