diff options
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r-- | src/tool_operate.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 1e4ed7df8..aaadeeb9d 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1050,6 +1050,15 @@ static CURLcode single_transfer(struct GlobalConfig *global, } } + if(config->output_dir) { + char *d = aprintf("%s/%s", config->output_dir, per->outfile); + if(!d) { + result = CURLE_WRITE_ERROR; + break; + } + free(per->outfile); + per->outfile = d; + } /* Create the directory hierarchy, if not pre-existent to a multiple file output call */ |