Merge "fix bug that passing invalid fd to fstats on win32 builds"

This commit is contained in:
Elliott Hughes 2015-02-09 19:50:01 +00:00 committed by Gerrit Code Review
commit 3f27558e29

View file

@ -240,7 +240,7 @@ static int write_data_file(int fd, const char *path, syncsendbuf *sbuf, int show
if (show_progress) {
// Determine local file size.
struct stat st;
if (fstat(lfd, &st)) {
if (stat(path, &st)) {
fprintf(stderr,"cannot stat '%s': %s\n", path, strerror(errno));
return -1;
}