From 6cea51585fc82f3abc540abfc2068517fb804128 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 10 Sep 2008 20:05:45 +0000 Subject: Checked in some code improvements and minor fixes that I discovered in the FreeBSD ports system. --- lib/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/file.c') diff --git a/lib/file.c b/lib/file.c index 6dd63b6a2..5e652001b 100644 --- a/lib/file.c +++ b/lib/file.c @@ -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; -- cgit v1.2.3