From 9e9bc4e144059036f3ceb1ef1fdd29317b38cd32 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 2 Feb 2007 15:16:54 +0000 Subject: [PATCH] * syscalls.cc (unlink_nt): Add missing assignment in case NtClose fails. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/syscalls.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7bfb5af0e..bd590901e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2007-02-02 Corinna Vinschen + + * syscalls.cc (unlink_nt): Add missing assignment in case NtClose fails. + 2007-02-01 Corinna Vinschen * net.cc (ga_dup): New function, taken from ga_clone with v4-in-v6 diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 6cc89f9ae..6a0e45fb5 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -330,7 +330,7 @@ unlink_nt (path_conv &win32_name, bool setattrs) also means that deleting fails. */ syscall_printf ("%p = NtClose (%p)", status, h); if (!lasterr) - RtlNtStatusToDosError (status); + lasterr = RtlNtStatusToDosError (status); } syscall_printf ("Deleting succeeded");