aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/times.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-01-14 20:39:59 +0000
committerCorinna Vinschen <corinna@vinschen.de>2002-01-14 20:39:59 +0000
commit7eddac1bc503f29cd81bba336ad7e45a20ee0bef (patch)
tree90d754a285de2c960781a3e715c41680225aa1a9 /winsup/cygwin/times.cc
parent55409319defa10e37a95cf3e3d60b7491fc79729 (diff)
downloadnewlib-7eddac1bc503f29cd81bba336ad7e45a20ee0bef.zip
newlib-7eddac1bc503f29cd81bba336ad7e45a20ee0bef.tar.gz
newlib-7eddac1bc503f29cd81bba336ad7e45a20ee0bef.tar.bz2
* 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.
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r--winsup/cygwin/times.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index e5635dd..1993c58 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;