From 7eddac1bc503f29cd81bba336ad7e45a20ee0bef Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 14 Jan 2002 20:39:59 +0000 Subject: * dir.cc: Use INVALID_FILE_ATTRIBUTES instead of "(DWORD) -1" for file attributes throughout. * fhandler.cc: Ditto. * fhandler_disk_file.cc: Ditto. * path.cc: Ditto. * path.h: Ditto. * syscalls.cc: Ditto. * times.cc (utimes): Use path_conv::isdir() instead of explicit GetFileAttributes() call. --- winsup/cygwin/times.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/times.cc') diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index e5635ddff..1993c5884 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -1,6 +1,6 @@ /* times.cc - Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. This file is part of Cygwin. @@ -475,8 +475,7 @@ utimes (const char *path, struct timeval *tvp) if (h == INVALID_HANDLE_VALUE) { - if ((res = GetFileAttributes (win32.get_win32 ())) != -1 && - (res & FILE_ATTRIBUTE_DIRECTORY)) + if (win32.isdir ()) { /* What we can do with directories more? */ res = 0; -- cgit v1.2.3