mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 16:26:12 +08:00
* fhandler.cc (fhandler_base::open): Move handling FILE_ATTRIBUTE_NORMAL
back to its old place. Or it to file_attributes instead of setting it.
This commit is contained in:
parent
703a42b96a
commit
fccdf679f4
@ -1,3 +1,8 @@
|
|||||||
|
2008-04-25 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler.cc (fhandler_base::open): Move handling FILE_ATTRIBUTE_NORMAL
|
||||||
|
back to its old place. Or it to file_attributes instead of setting it.
|
||||||
|
|
||||||
2008-04-25 Corinna Vinschen <corinna@vinschen.de>
|
2008-04-25 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler.cc (fhandler_base::open): *Only* handle SYSTEM and HIDDEN
|
* fhandler.cc (fhandler_base::open): *Only* handle SYSTEM and HIDDEN
|
||||||
|
@ -539,7 +539,6 @@ fhandler_base::open (int flags, mode_t mode)
|
|||||||
|
|
||||||
if (get_device () == FH_FS)
|
if (get_device () == FH_FS)
|
||||||
{
|
{
|
||||||
file_attributes = FILE_ATTRIBUTE_NORMAL;
|
|
||||||
/* Add the reparse point flag to native symlinks, otherwise we open the
|
/* Add the reparse point flag to native symlinks, otherwise we open the
|
||||||
target, not the symlink. This would break lstat. */
|
target, not the symlink. This would break lstat. */
|
||||||
if (pc.is_rep_symlink ())
|
if (pc.is_rep_symlink ())
|
||||||
@ -556,6 +555,8 @@ fhandler_base::open (int flags, mode_t mode)
|
|||||||
|
|
||||||
if (flags & O_CREAT)
|
if (flags & O_CREAT)
|
||||||
{
|
{
|
||||||
|
file_attributes |= FILE_ATTRIBUTE_NORMAL;
|
||||||
|
|
||||||
/* If mode has no write bits set, we set the R/O attribute. */
|
/* If mode has no write bits set, we set the R/O attribute. */
|
||||||
if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
|
if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
|
||||||
file_attributes |= FILE_ATTRIBUTE_READONLY;
|
file_attributes |= FILE_ATTRIBUTE_READONLY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user