summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/security.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r--winsup/cygwin/security.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
index c7533dee0..d9a1e5f85 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/security.cc
@@ -1437,8 +1437,8 @@ get_file_attribute (int use_ntsec, HANDLE handle, const char *file,
if (use_ntsec && allow_ntsec && wincap.has_security ())
{
- if (handle && get_nt_object_attribute (handle, SE_FILE_OBJECT,
- attribute, uidret, gidret))
+ if (!handle || get_nt_object_attribute (handle, SE_FILE_OBJECT,
+ attribute, uidret, gidret))
get_nt_attribute (file, attribute, uidret, gidret);
return 0;
}