Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-05-31 04:15:22 +0400
committerChristopher Faylor <me@cgf.cx>2002-05-31 04:15:22 +0400
commit5d8c7a56c287079c59491f3dee8e33e05cefdf45 (patch)
tree7d09f9c81e5466f437202c5a6bc273c3939499bb /winsup/cygwin/fhandler_disk_file.cc
parent53e05aecc10a5bc03e6c935a217f5563789bb54c (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index c4474f184..5c266ee0b 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -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;
}