https://bugs.winehq.org/show_bug.cgi?id=57245
Bug ID: 57245 Summary: Can't recognize executables/scripts with a dot in the name... Product: Wine Version: 9.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: vingian@email.com Distribution: ---
Created attachment 77162 --> https://bugs.winehq.org/attachment.cgi?id=77162 example
Probably related to: https://gitlab.winehq.org/wine/wine/-/blob/658df7f2121d4dc7c6e6044b9527e0739...
https://bugs.winehq.org/show_bug.cgi?id=57245
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |testcase CC| |dark.shadow4@web.de Ever confirmed|0 |1
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- Confirming.
https://bugs.winehq.org/show_bug.cgi?id=57245
--- Comment #2 from vingian@email.com --- After some debugging... looks like the problem is here: https://gitlab.winehq.org/wine/wine/-/blob/658df7f2121d4dc7c6e6044b9527e0739... Since the name has a dot... thinks there's an extension and tries to check if it's a valid file, but can't find. Maybe... use search_in_pathext as a fallback?
In previous versions(like 9.17)... worked well because of this: https://gitlab.winehq.org/wine/wine/-/blob/wine-9.17/programs/cmd/wcmdmain.c...
https://bugs.winehq.org/show_bug.cgi?id=57245
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com Status|NEW |ASSIGNED
--- Comment #3 from Eric Pouech eric.pouech@gmail.com --- if you can test it (AFK for now): replace line 1523 of programs/cmd/wcmdmain.c the wcschr by wcsrchr, that should do it (don't worry if you can't, I'll handle next week otherwise)
https://bugs.winehq.org/show_bug.cgi?id=57245
--- Comment #4 from vingian@email.com --- Created attachment 77164 --> https://bugs.winehq.org/attachment.cgi?id=77164 cmd dot patch
Didn't work... The file name contains a dot... which is interpreted as an extension(so... sc->has_extension will always be true).
However... this worked(patch attached). Similar to the previous solution, if can't find the file... searches for path + pathext.
https://bugs.winehq.org/show_bug.cgi?id=57245
--- Comment #5 from Eric Pouech eric.pouech@gmail.com --- thanks for looking into it
patch in #4 looks good to me
do you want to submit it as a merge request?
(ideally, I'd add a comment in wcmdmain.c to explain the extra lookup; and non-regression tests should be added too)
https://bugs.winehq.org/show_bug.cgi?id=57245
--- Comment #6 from vingian@email.com --- Oh no... I don't know exactly how to do this... If you could... would be much better! Thank you!
https://bugs.winehq.org/show_bug.cgi?id=57245
vingian@email.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED
--- Comment #7 from vingian@email.com --- Fixed in 9.19 Thank you very much!
https://bugs.winehq.org/show_bug.cgi?id=57245
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.20.