diff options
author | Christopher Faylor <me@cgf.cx> | 2003-03-22 17:48:40 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-03-22 17:48:40 +0000 |
commit | ca04f61fc7b7d38bb21db969ec8b70007bde868f (patch) | |
tree | 76449441295c4d9709d9cf9a4815f7687bf48ed2 /winsup/cygwin/syscalls.cc | |
parent | 89e7a1ced922ad59128f0ec1223536d8d0c60e5d (diff) | |
download | cygnal-ca04f61fc7b7d38bb21db969ec8b70007bde868f.tar.gz cygnal-ca04f61fc7b7d38bb21db969ec8b70007bde868f.tar.bz2 cygnal-ca04f61fc7b7d38bb21db969ec8b70007bde868f.zip |
* syscalls.cc (unlink): Be more defensive when SetFileAttributes is called.
Fix typo in debugging output.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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; } |