* fhandler.cc (fhandler_disk_file::fstat): Avoid clearing S_IFMT bits since

we've already pre-cleared everything anyway.
This commit is contained in:
Christopher Faylor 2001-05-31 19:58:59 +00:00
parent fd047fb9d5
commit 1de197515e
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Thu May 31 15:57:57 2001 Christopher Faylor <cgf@cygnus.com>
* fhandler.cc (fhandler_disk_file::fstat): Avoid clearing S_IFMT bits
since we've already pre-cleared everything anyway.
Wed May 30 23:51:32 2001 Earnie Boyd <earnie_boyd@yahoo.com>
* path.cc (chdir): Always send unsigned chars to isspace since newlib's

View File

@ -938,8 +938,9 @@ fhandler_disk_file::fstat (struct stat *buf)
&& !get_symlink_p ())
buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
buf->st_mode &= ~S_IFMT;
if (get_socket_p ())
if (buf->st_mode & S_IFMT)
/* already set */;
else if (get_socket_p ())
buf->st_mode |= S_IFSOCK;
else if (local.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
buf->st_mode |= S_IFDIR;
@ -954,7 +955,9 @@ fhandler_disk_file::fstat (struct stat *buf)
buf->st_mode |= STD_WBITS;
/* | S_IWGRP | S_IWOTH; we don't give write to group etc */
if (get_socket_p ())
if (buf->st_mode & S_IFMT)
/* already set */;
else if (get_socket_p ())
buf->st_mode |= S_IFSOCK;
else
switch (GetFileType (get_handle ()))