| Summary: | com.sun.star.system.SystemShellExecute does not correctly process paths with wildcards | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | joesch04 |
| Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED NOTABUG | ||
| Severity: | normal | CC: | himajin100000, joesch04, sberg.fun |
| Priority: | medium | ||
| Version: | 7.0.1.2 release | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Attachments: | Extension to reproduce the Bug (see description in the Bug-report) | ||
|
Description
joesch04
2021-04-06 11:23:53 UTC
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! |