mirror of
https://github.com/curl/curl.git
synced 2026-07-30 11:48:08 +03:00
tool_operate: let --create-dirs work for --dump-header as well
Add test 3011 to verify Proposed-by: Montg0mery on github Fixes #14941 Closes #14965
This commit is contained in:
parent
44fc2687b1
commit
b4f7ec71ce
4 changed files with 77 additions and 1 deletions
|
|
@ -1090,6 +1090,12 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
|||
* OperationConfig, so that it does not need to be opened/closed
|
||||
* for every transfer.
|
||||
*/
|
||||
if(config->create_dirs) {
|
||||
result = create_dir_hierarchy(config->headerfile, global);
|
||||
/* create_dir_hierarchy shows error upon CURLE_WRITE_ERROR */
|
||||
if(result)
|
||||
break;
|
||||
}
|
||||
if(!per->prev || per->prev->config != config) {
|
||||
newfile = fopen(config->headerfile, "wb");
|
||||
if(newfile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue