On Wed Jan 14 09:34:50 2026 +0000, eric pouech wrote:
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) I've discovered that the behavior of `pushd` on Windows 7 is indeed quite complex. I need to conduct more tests to understand the rules behind how `pushd` handles quotes and `/`.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9881#note_127292