* fhandler.cc (fhandler_disk_file::fstat): Avoid clearing S_IFMT bits since
we've already pre-cleared everything anyway.
This commit is contained in:
parent
fd047fb9d5
commit
1de197515e
|
@ -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
|
||||
|
|
|
@ -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 ()))
|
||||
|
|
Loading…
Reference in New Issue