mirror of
https://github.com/curl/curl.git
synced 2026-06-04 08:34:16 +03:00
curl: fix -T globbing
Regression from e59371a493 (7.67.0)
Added test 490, 491 and 492 to verify the functionality.
Reported-by: Kamil Dudka
Reported-by: Anderson Sasaki
Fixes #4588
Closes #4591
This commit is contained in:
parent
674298d191
commit
7a46aeb0be
5 changed files with 232 additions and 6 deletions
|
|
@ -829,12 +829,6 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
|||
separator = ((!state->outfiles ||
|
||||
!strcmp(state->outfiles, "-")) && urlnum > 1);
|
||||
|
||||
/* Here's looping around each globbed URL */
|
||||
|
||||
if(state->li >= urlnum) {
|
||||
state->li = 0;
|
||||
state->up++;
|
||||
}
|
||||
if(state->up < state->infilenum) {
|
||||
struct per_transfer *per;
|
||||
struct OutStruct *outs;
|
||||
|
|
@ -1908,6 +1902,15 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
|||
per->retrystart = tvnow();
|
||||
|
||||
state->li++;
|
||||
/* Here's looping around each globbed URL */
|
||||
if(state->li >= urlnum) {
|
||||
state->li = 0;
|
||||
state->urlnum = 0; /* forced reglob of URLs */
|
||||
glob_cleanup(state->urls);
|
||||
state->urls = NULL;
|
||||
state->up++;
|
||||
Curl_safefree(state->uploadfile); /* clear it to get the next */
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Free this URL node data without destroying the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue