* 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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user