tool_operate: keep the filename for upload globbing

Follow-up to 19695e815c

Verify with test 2012 and 2013

Closes #21401
This commit is contained in:
Daniel Stenberg 2026-04-21 17:14:51 +02:00
parent 779bba2f3f
commit dcf535629b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 189 additions and 3 deletions

View file

@ -1076,8 +1076,9 @@ static CURLcode setup_outfile(struct OperationConfig *config,
}
}
else {
per->outfile = u->outfile;
u->outfile = NULL;
per->outfile = curlx_strdup(u->outfile);
if(!per->outfile)
return CURLE_OUT_OF_MEMORY;
}
DEBUGASSERT(per->outfile);