* syscalls.cc (unlink): Be more defensive when SetFileAttributes is called.
Fix typo in debugging output.
This commit is contained in:
parent
89e7a1ced9
commit
ca04f61fc7
@ -1,3 +1,8 @@
|
|||||||
|
2003-03-22 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* syscalls.cc (unlink): Be more defensive when SetFileAttributes is
|
||||||
|
called. Fix typo in debugging output.
|
||||||
|
|
||||||
2003-03-21 Christopher Faylor <cgf@redhat.com>
|
2003-03-21 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
|
* fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
|
||||||
|
@ -152,8 +152,10 @@ unlink (const char *ourname)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Allow us to delete even if read-only */
|
/* Allow us to delete even if read-only */
|
||||||
SetFileAttributes (win32_name, (DWORD) win32_name & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM));
|
setattrs = SetFileAttributes (win32_name,
|
||||||
setattrs = true;
|
(DWORD) win32_name
|
||||||
|
& ~(FILE_ATTRIBUTE_READONLY
|
||||||
|
| FILE_ATTRIBUTE_SYSTEM));
|
||||||
}
|
}
|
||||||
/* Attempt to use "delete on close" semantics to handle removing
|
/* Attempt to use "delete on close" semantics to handle removing
|
||||||
a file which may be open. */
|
a file which may be open. */
|
||||||
@ -183,7 +185,7 @@ unlink (const char *ourname)
|
|||||||
/* Try a delete with attributes reset */
|
/* Try a delete with attributes reset */
|
||||||
if (DeleteFile (win32_name))
|
if (DeleteFile (win32_name))
|
||||||
{
|
{
|
||||||
syscall_printf ("DeleteFile after CreateFile/ClosHandle succeeded");
|
syscall_printf ("DeleteFile after CreateFile/CloseHandle succeeded");
|
||||||
goto ok;
|
goto ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user