https://bugs.winehq.org/show_bug.cgi?id=57290
Bug ID: 57290 Summary: String Substitution not working Product: Wine Version: 9.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: huangqinjin@gmail.com Distribution: ---
set "f=a.txt" echo "%f:.=_%"
It outputs "a_txt" on Windows CMD and Wine 9.18, but output "atxt" for Wine 9.19.
https://bugs.winehq.org/show_bug.cgi?id=57290
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED Assignee|wine-bugs@winehq.org |eric.pouech@gmail.com
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- Created attachment 77233 --> https://bugs.winehq.org/attachment.cgi?id=77233 patch
likely a regression introduced by 9d12cd0261200f2e1e9f859ad3b03f45f95d323a (didn't check if it's the case...) the attached patch fixes it locally will need to add some tests on top the patch (and also require to test the other substitution forms which may suffer from similar issues)
https://bugs.winehq.org/show_bug.cgi?id=57290
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #2 from Eric Pouech eric.pouech@gmail.com --- *** Bug 57365 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=57290
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression, source CC| |alexhenrie24@gmail.com Regression SHA1| |9d12cd0261200f2e1e9f859ad3b | |03f45f95d323a
--- Comment #3 from Alex Henrie alexhenrie24@gmail.com --- You were right. `git bisect` says:
commit 9d12cd0261200f2e1e9f859ad3b03f45f95d323a Author: Eric Pouech epouech@codeweavers.com AuthorDate: Sat Sep 7 11:16:47 2024 +0200 Commit: Alexandre Julliard julliard@winehq.org CommitDate: Mon Sep 23 12:17:43 2024 +0200
cmd: Rewrite part of WCMD_expand_envvar.
Simplifying a bit the code, removing extraneous data copy.
Signed-off-by: Eric Pouech epouech@codeweavers.com
programs/cmd/wcmdmain.c | 183 +++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------- 1 file changed, 52 insertions(+), 131 deletions(-)
https://bugs.winehq.org/show_bug.cgi?id=57290
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |94c61ed7c8549b00d12c01404e0 | |0a3fc7bfeaa8b Resolution|--- |FIXED Status|ASSIGNED |RESOLVED
--- Comment #4 from Fabian Maurer dark.shadow4@web.de --- With https://gitlab.winehq.org/wine/wine/-/merge_requests/6803 merged this is fixed by https://gitlab.winehq.org/wine/wine/-/commit/94c61ed7c8549b00d12c01404e00a3f...
https://bugs.winehq.org/show_bug.cgi?id=57290
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.22.