Checked in some code improvements and minor fixes that I discovered in the

FreeBSD ports system.
This commit is contained in:
Dan Fandrich 2008-09-10 20:05:45 +00:00
parent fce9c3a9f1
commit 6cea51585f
5 changed files with 15 additions and 10 deletions

View file

@ -347,7 +347,7 @@ static CURLcode file_upload(struct connectdata *conn)
/* treat the negative resume offset value as the case of "-" */
if(data->state.resume_from < 0) {
if(stat(file->path, &file_stat)) {
if(fstat(fileno(fp), &file_stat)) {
fclose(fp);
failf(data, "Can't get the size of %s", file->path);
return CURLE_WRITE_ERROR;