mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
cmd: Fix delayed expansion in FOR loop on file sets.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
0ca28d3a70
commit
f98077591f
2 changed files with 8 additions and 3 deletions
|
@ -610,8 +610,8 @@ N
|
|||
''
|
||||
'.eh'@or_broken@''
|
||||
"foo bar"
|
||||
@todo_wine@foo
|
||||
@todo_wine@bar
|
||||
foo
|
||||
bar
|
||||
--- in digit variables
|
||||
a %1 %2
|
||||
b %1 %2
|
||||
|
|
|
@ -3255,6 +3255,7 @@ static CMD_NODE *for_control_execute_set(CMD_FOR_CONTROL *for_ctrl, const WCHAR
|
|||
len = 0;
|
||||
|
||||
wcscpy(set, for_ctrl->set);
|
||||
handleExpansion(set, context != NULL, delayedsubst);
|
||||
for (i = 0; ; i++)
|
||||
{
|
||||
WCHAR *element = WCMD_parameter(set, i, NULL, TRUE, FALSE);
|
||||
|
@ -3314,7 +3315,11 @@ static CMD_NODE *for_control_execute_walk_files(CMD_FOR_CONTROL *for_ctrl, CMD_N
|
|||
|
||||
if (for_ctrl->root_dir)
|
||||
{
|
||||
dirs_to_walk = WCMD_dir_stack_create(for_ctrl->root_dir, NULL);
|
||||
WCHAR buffer[MAXSTRING];
|
||||
|
||||
wcscpy(buffer, for_ctrl->root_dir);
|
||||
handleExpansion(buffer, context != NULL, delayedsubst);
|
||||
dirs_to_walk = WCMD_dir_stack_create(buffer, NULL);
|
||||
}
|
||||
else dirs_to_walk = WCMD_dir_stack_create(NULL, NULL);
|
||||
ref_len = wcslen(dirs_to_walk->dirName);
|
||||
|
|
Loading…
Reference in a new issue