mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
* fhandler.cc (fhandler_base::open): Call set_file_attribute() only if a file is really created.
This commit is contained in:
parent
af792540a6
commit
2be36bd9c4
@ -1,3 +1,9 @@
|
||||
Fri Mar 17 18:16:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
Patch suggested by Eric Fifer <EFifer@sanwaint.com>
|
||||
* fhandler.cc (fhandler_base::open): Call set_file_attribute()
|
||||
only if a file is really created.
|
||||
|
||||
Thu Mar 16 14:15:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* security.cc (set_process_privileges): Remove `static'.
|
||||
|
@ -340,7 +340,9 @@ fhandler_base::open (int flags, mode_t mode)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (flags & O_CREAT && get_device () == FH_DISK)
|
||||
// Attributes may be set only if a file is _really_ created.
|
||||
if (flags & O_CREAT && get_device () == FH_DISK
|
||||
&& GetLastError () != ERROR_ALREADY_EXISTS)
|
||||
set_file_attribute (has_acls (), get_win32_name (), mode);
|
||||
|
||||
namehash_ = hash_path_name (0, get_win32_name ());
|
||||
|
Loading…
x
Reference in New Issue
Block a user