Description: Since LO 7.x, paths with wildcards are no longer processed correctly by "com.sun.star.system.SystemShellExecute". As an example you can install mottco (http://calc-info.de/files/mottco_200.oxt) and call the button "Hilfe/Über....--->Dokumentation anzeigen" there, which starts the following macro: Sub help_call() Dim aService Dim pdf_directory aService = GetDefaultContext().getByName("/singletons/com.sun.star.deployment.PackageInformationProvider") pdf_directory = aService.getPackageLocation("org.joesch.mottco") & "/mottco/" If FileExists(ConvertToUrl(pdf_directory & "mottco_help.pdf")) Then Dim start as object start = createUnoService("com.sun.star.system.SystemShellExecute") start.execute(ConvertToUrl(pdf_directory & "mottco_help.pdf"), "", 0) Else MsgBox ("The help file was not found." ,16, "Help file not available") Exit Sub End If End Sub Up to LO 6.x this worked correctly, since 7.x it gives the following error message: "file:///E:/LO_710/LibreOfficePortable/App/libreoffice/program/../../Data/settings/user/uno_packages/cache/uno_packages/lu7860nw7fts.tmp_/mottco_200.oxt could not be found [...]" In "FileExists( ..." the path is evaluated correctly here, because the following returns "True": aService = GetDefaultContext().getByName("/singletons/com.sun.star.deployment.PackageInformationProvider") pdf_directory = aService.getPackageLocation("org.joesch.mottco") & "/mottco/" Msgbox FileExists(ConvertToUrl(pdf_directory & "mottco_help.pdf")) Steps to Reproduce: 1.install http://calc-info.de/files/mottco_200.oxt 2.run: Hilfe/Über....--->Dokumentation anzeigen 3. Actual Results: you get the error message (example): "file:///E:/LO_710/LibreOfficePortable/App/libreoffice/program/../../../Data/settings/user/uno_packages/cache/uno_packages/lu7860nw7fts.tmp_/mottco_200.oxt konnte nicht gefunden werden [...]" Expected Results: The path should be correctly detected and a PDF file should be opened Reproducible: Always User Profile Reset: Yes Additional Info: The problem is not specific to the extensions named "mottco", this extension is only given as an example because it requires an extension to reproduce the error, since the return of : aService = GetDefaultContext().getByName("/singletons/com.sun.star.deployment.PackageInformationProvider") pdf_directory = aService.getPackageLocation("org.joesch.mottco") & "/mottco/" as input value for: start = createUnoService("com.sun.star.system.SystemShellExecute") start.execute(ConvertToUrl(pdf_directory & "mottco_help.pdf"), "", 0) is needed, because in the returned path for .getPackageLocation, the placeholder "/../../../" occurs.
Created attachment 170978 [details] Extension to reproduce the Bug (see description in the Bug-report)
A small correction: ".." is not a wildcard, but a relative path element. (In reply to joesch04 from comment #0) > Since LO 7.x, paths with wildcards are no longer processed correctly by > "com.sun.star.system.SystemShellExecute". In fact, this is not true. The URL is passed unchanged to the ShellExecuteExW, and this is the limitation of *system* call that it disallows the relative parts in the URL. IMO this is NOTABUG, and was working previously just by accident, because LibreOffice had pre-processed the URL (and that was wrong, since the idea behind XSystemShellExecute::execute is pass the argument to system shell unchanged). The author of the extension (Jorg) likely should use a call to ConvertFromURL [1] and pass the system path to the execute() call, which would succeed. Stephan could correct me if I am wrong here; adding him to CC. [1] https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03120313.html
(In reply to Mike Kaganski from comment #2) > this is the limitation of *system* call that it > disallows the relative parts in the URL. For test, try to use system's Run (Windows key + R) and run the failing URL there. The result would be exactly the same error message.
> A small correction: ".." is not a wildcard yes, that's right. I had forgotten the correct term. > The author of the extension (Jorg) likely should use a > call to ConvertFromURL [1] and pass the system path to > the execute() call, which would succeed. mmh ... embarrassing for me [*], because I have to say: 'it's not a bug, it's my stupidity'. You are absolutely right, using "ConvertFromURL" fixes the problem AND in the idl reference the usage of the path parameter is described meticulously correct [**]. The wrong use of "ConvertToURL" exists in "mottco" ready 10 years for sure :-( [*] I myself, am "Jörg" - "joesch" is the abbreviation for "Jörg Schmidt". [**] https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1system_1_1XSystemShellExecute.html
(In reply to joesch04 from comment #4) > mmh ... embarrassing for me [*], because I have to say: 'it's not a bug, > it's my stupidity'. We all make mistakes; errare humanum est :-) > [*] > I myself, am "Jörg" - "joesch" is the abbreviation for "Jörg Schmidt". Nice to meet you!