diff options
author | Yang Tse <yangsita@gmail.com> | 2008-09-12 03:24:27 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-09-12 03:24:27 +0000 |
commit | 2bcd13aaee0476a6b3e63cb600bad2dd0ca593f2 (patch) | |
tree | 696b9c91f1210f90ecdd2268389ac53c386dec09 | |
parent | 20723cb7927731f7ade0d86985313e2ad12a5be1 (diff) |
ANSI C compatibility fix
-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) { |