basic/source/runtime/methods.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit e59b17583f20943f0b03cdac437deb72e94c3d2e
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Jan 30 12:11:10 2025 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Feb 6 09:28:14 2025 +0100

    disable SbRtl_Shell by default in kit-mode
    
    Change-Id: I645c776bf59a718f4946c2c70edd9194f039e471
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180969
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit e8d326f51e8efe587c97851fd917c4e5481d1675)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181203

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 718385dedb6d..a9c2b76e30db 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -45,6 +45,7 @@
 #include <rtl/string.hxx>
 #include <sal/log.hxx>
 #include <comphelper/DirectoryHelper.hxx>
+#include <comphelper/lok.hxx>
 
 #include <runtime.hxx>
 #include <sbunoobj.hxx>
@@ -3559,6 +3560,13 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool)
     }
     else
     {
+        // Just go straight to error in this case
+        if (comphelper::LibreOfficeKit::isActive())
+        {
+            StarBASIC::Error(ERRCODE_BASIC_FILE_NOT_FOUND);
+            return;
+        }
+
         oslProcessOption nOptions = osl_Process_SEARCHPATH | 
osl_Process_DETACHED;
 
         OUString aCmdLine = rPar.Get(1)->GetOUString();

Reply via email to