* path.cc (etc::test_file_change): In case of NtQueryFullAttributesFile

returning an error, only return true if file actually exists.
This commit is contained in:
Corinna Vinschen 2014-01-22 15:45:29 +00:00
parent e9286a873f
commit 42ce449890
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2014-01-22 Corinna Vinschen <corinna@vinschen.de>
* path.cc (etc::test_file_change): In case of NtQueryFullAttributesFile
returning an error, only return true if file actually exists.
2014-01-20 Corinna Vinschen <corinna@vinschen.de> 2014-01-20 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/in6.h (struct ipv6_rt_hdr): Define. * include/cygwin/in6.h (struct ipv6_rt_hdr): Define.

View File

@ -1,7 +1,7 @@
/* path.cc: path support. /* path.cc: path support.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc. 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.
@ -4645,7 +4645,7 @@ etc::test_file_change (int n)
status = NtQueryFullAttributesFile (&fn[n], &fnoi); status = NtQueryFullAttributesFile (&fn[n], &fnoi);
if (!NT_SUCCESS (status)) if (!NT_SUCCESS (status))
{ {
res = true; res = status != STATUS_OBJECT_NAME_NOT_FOUND;
memset (last_modified + n, 0, sizeof (last_modified[n])); memset (last_modified + n, 0, sizeof (last_modified[n]));
debug_printf ("NtQueryFullAttributesFile (%S) failed, %y", debug_printf ("NtQueryFullAttributesFile (%S) failed, %y",
fn[n].ObjectName, status); fn[n].ObjectName, status);