From ca04f61fc7b7d38bb21db969ec8b70007bde868f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 22 Mar 2003 17:48:40 +0000 Subject: * syscalls.cc (unlink): Be more defensive when SetFileAttributes is called. Fix typo in debugging output. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/syscalls.cc | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'winsup') diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index d6d67c905..666dc3a78 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-03-22 Christopher Faylor + + * syscalls.cc (unlink): Be more defensive when SetFileAttributes is + called. Fix typo in debugging output. + 2003-03-21 Christopher Faylor * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 7c6d9a703..b3ae5a0dc 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -152,8 +152,10 @@ unlink (const char *ourname) else { /* Allow us to delete even if read-only */ - SetFileAttributes (win32_name, (DWORD) win32_name & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)); - setattrs = true; + setattrs = SetFileAttributes (win32_name, + (DWORD) win32_name + & ~(FILE_ATTRIBUTE_READONLY + | FILE_ATTRIBUTE_SYSTEM)); } /* Attempt to use "delete on close" semantics to handle removing a file which may be open. */ @@ -183,7 +185,7 @@ unlink (const char *ourname) /* Try a delete with attributes reset */ if (DeleteFile (win32_name)) { - syscall_printf ("DeleteFile after CreateFile/ClosHandle succeeded"); + syscall_printf ("DeleteFile after CreateFile/CloseHandle succeeded"); goto ok; } -- cgit v1.2.3