https://bugs.documentfoundation.org/show_bug.cgi?id=157162

            Bug ID: 157162
           Summary: Blank character in LibreOffice installation directory
                    leads to error message when bootstrapping from Python
                    script
           Product: LibreOffice
           Version: 7.6.0.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: sdk
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 189444
  --> https://bugs.documentfoundation.org/attachment.cgi?id=189444&action=edit
A sample Python scripts that uses bootstrap() method

Description:
Having a blank character in LibreOffice installation directory leads to the
display of an error message when bootstrapping from Python script. This is
specially important on Windows where this is the default situation. The default
Windows installation is in "C:\Program Files\LibreOffice", which contains a
space character.

Steps to Reproduce:
1. Download start.py from the attachment
1. Go to some folder, for example c:\windows\tmp
2. Run this command:
 "c:\Program Files\LibreOffice\program\python.exe" start.py
If start.py is somewhere else, give the correct path.

Actual Results:
Dialog box, showing something like this:
c:\Windows\Temp\Files\LibreOffice\program\soffice.exe does not exist.

This string (wrong path) consists of:

1) Current working directory
2) Path to Python binary, cut after space character
3) soffice.exe

The error dialog box says the soffice.exe (within the wrong path) does not
exist. This shows that soffice.exe is called with wrong parameters, so that it
wrongly assumes that this the above string is a file to open, and it gives
error that it does not exist.
It seems that the parameter handling routines do not care well enough about the
possible space characters in the path.

Expected Results:
Invoking soffice.exe should happen with the correct parameters, and the error
dialog box should not appear.

Reproducible: Always


User Profile Reset: No


Additional Info:
Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

A workaround is using short names, where applicable. For example, on Windows
one can invoke:

 "c:\Progra~1\LibreOffice\program\python.exe" start.py

In this case, the error dialog does not come up.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to