* fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call fstat_by_name

if fd is not opened to allow fstat_by_name to properly set errno.
* fhandler.cc (binmode): Default to binmode when mode is not known.
This commit is contained in:
Christopher Faylor
2002-05-31 00:15:22 +00:00
parent 53e05aecc1
commit 5d8c7a56c2
3 changed files with 14 additions and 4 deletions

View File

@ -166,13 +166,13 @@ fhandler_disk_file::fstat (struct __stat64 *buf, path_conv *pc)
}
}
if (oret)
if (!oret)
res = fstat_by_name (buf, pc);
else
{
res = fstat_by_handle (buf, pc);
close ();
}
else if (pc->exists ())
res = fstat_by_name (buf, pc);
return res;
}