summaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index ad4e85dd8..cb7371280 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 */