On Wed Jan 14 08:22:37 2026 +0000, Yeshun Ye wrote:
In a batch script of an installer, there is a command `pushd "C:\Program Files\some path/"`. This works correctly on Windows. I have only modified the functions related to `pushd`, and the changes do not affect other parts of the code. hmm native is even funkier than I ever thought
retested on native: `pushd c:/users` fails but `pushd "c:/users"` succeeds and `pushd "/users"` fails (even if on c: drive) this would require some more testings (as I fear this is not related to pushd but generic to all buitin commands), but it looks like current arg parsing code for builtin commands has to be revamped (it correctly stripes the ", but doesn't inform caller) as an example: `dir /users` fails with 'invalid switch' error, while `dir "/users"` succeeds (and lists `c:\users` directory) until we come up with a plan to a better interface to parse builin args, what you could do is: * use WCMD_parameter to get the argument (passing false to the unquote parameter) * and have different code paths (fail if not quoted and has a '/'; pass path after removing the quotes) * you could eventually also ensure that pushd is called with a single arg, which isn't done yet (but that's not mandatory) * and that would tests (to be added in success/failure parts of test_builtin.cmd and test_builtin.bat) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9881#note_126912