aboutsummaryrefslogtreecommitdiff
path: root/ftp/curl/files/patch-src-tool_operate.c
diff options
context:
space:
mode:
Diffstat (limited to 'ftp/curl/files/patch-src-tool_operate.c')
-rw-r--r--ftp/curl/files/patch-src-tool_operate.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/ftp/curl/files/patch-src-tool_operate.c b/ftp/curl/files/patch-src-tool_operate.c
index ccded252b3dd..77ab0a758e2b 100644
--- a/ftp/curl/files/patch-src-tool_operate.c
+++ b/ftp/curl/files/patch-src-tool_operate.c
@@ -1,7 +1,7 @@
---- src/tool_operate.c.orig 2018-10-27 10:00:54 UTC
+--- src/tool_operate.c.orig 2019-09-10 17:47:19 UTC
+++ src/tool_operate.c
-@@ -603,20 +603,7 @@ static CURLcode operate_do(struct Global
- DEBUGASSERT(!outs.filename);
+@@ -960,20 +960,7 @@ static CURLcode create_transfers(struct
+ DEBUGASSERT(!outs->filename);
}
- if(config->resume_from_current) {
@@ -9,7 +9,7 @@
- of the file as it is now and open it for append instead */
- struct_stat fileinfo;
- /* VMS -- Danger, the filesize is only valid for stream files */
-- if(0 == stat(outfile, &fileinfo))
+- if(0 == stat(per->outfile, &fileinfo))
- /* set offset to current file size: */
- config->resume_from = fileinfo.st_size;
- else
@@ -22,26 +22,26 @@
#ifdef __VMS
/* open file for output, forcing VMS output format into stream
mode which is needed for stat() call above to always work. */
-@@ -624,7 +611,8 @@ static CURLcode operate_do(struct Global
+@@ -981,7 +968,8 @@ static CURLcode create_transfers(struct
"ctx=stm", "rfm=stmlf", "rat=cr", "mrs=0");
#else
/* open file for output: */
-- FILE *file = fopen(outfile, config->resume_from?"ab":"wb");
+- FILE *file = fopen(per->outfile, config->resume_from?"ab":"wb");
+ /* (always open for appending, it has no effect on new files) */
-+ FILE *file = fopen(outfile, "ab");
++ FILE *file = fopen(per->outfile, "ab");
#endif
if(!file) {
- helpf(global->errors, "Can't open '%s'!\n", outfile);
-@@ -633,6 +621,19 @@ static CURLcode operate_do(struct Global
+ helpf(global->errors, "Can't open '%s'!\n", per->outfile);
+@@ -990,6 +978,19 @@ static CURLcode create_transfers(struct
}
- outs.fopened = TRUE;
- outs.stream = file;
+ outs->fopened = TRUE;
+ outs->stream = file;
+
+ if(config->resume_from_current) {
+ /* We're told to continue from where we are now. Get the size
+ of the file as it is now */
+ struct_stat fileinfo;
-+ if(0 == fstat(fileno(outs.stream), &fileinfo))
++ if(0 == fstat(fileno(outs->stream), &fileinfo))
+ /* set offset to current file size: */
+ config->resume_from = fileinfo.st_size;
+ else
@@ -49,6 +49,6 @@
+ config->resume_from = 0;
+ }
+
- outs.init = config->resume_from;
+ outs->init = config->resume_from;
}
else {