diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/file.c b/lib/file.c index 5e652001b..9b9ef2be3 100644 --- a/lib/file.c +++ b/lib/file.c @@ -333,7 +333,8 @@ static CURLcode file_upload(struct connectdata *conn) failf(data, "Can't open %s for writing", file->path); return CURLE_WRITE_ERROR; } - fp = fdopen(fd, "wb"); + close(fd); + fp = fopen(file->path, "wb"); } if(!fp) { |