[PATCH 0/1] MR9040: cmd: Allow DIR /Oxxx at the command line to override DIRCMD=/Oyyy set in the environment.
Fix regression, likely caused by me, where DIR /O options entered at the command line do not override any /O options that might be set in the DIRCMD environment variable. Fix is to reset applicable sort order state whenever /O is encountered in the options list. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9040
From: Joe Souza <jsouza(a)yahoo.com> --- programs/cmd/directory.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c index ac4ecfed2e6..96174a3f4fc 100644 --- a/programs/cmd/directory.c +++ b/programs/cmd/directory.c @@ -769,7 +769,13 @@ RETURN_CODE WCMD_directory(WCHAR *args) goto exit; } break; - case 'O': p = p + 1; + case 'O': /* Reset order state for each occurrence of /O, i.e. if DIRCMD contains /O and user + also specified /O on the command line. */ + dirOrder = Unspecified; + orderGroupDirs = FALSE; + orderReverse = FALSE; + orderGroupDirsReverse = FALSE; + p = p + 1; if (*p==':') p++; /* Skip optional : */ while (*p && *p != '/') { WINE_TRACE("Processing subparm '%c' (in %s)\n", *p, wine_dbgstr_w(quals)); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9040
it would be better to add also tests for DIRCMD (restricted to /O case) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9040#note_116811
participants (3)
-
eric pouech (@epo) -
Joe Souza -
Joe Souza (@JoeS209)