summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/syscalls.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/syscalls.cc
parent55409319defa10e37a95cf3e3d60b7491fc79729 (diff)
downloadcygnal-7eddac1bc503f29cd81bba336ad7e45a20ee0bef.tar.gz
cygnal-7eddac1bc503f29cd81bba336ad7e45a20ee0bef.tar.bz2
cygnal-7eddac1bc503f29cd81bba336ad7e45a20ee0bef.zip
* 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/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index a7bb3ac00..c7693ae81 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -205,7 +205,8 @@ _unlink (const char *ourname)
syscall_printf ("CreateFile/CloseHandle succeeded");
/* Everything is fine if the file has disappeared or if we know that the
FILE_FLAG_DELETE_ON_CLOSE will eventually work. */
- if (GetFileAttributes (win32_name) == (DWORD) -1 || delete_on_close_ok)
+ if (GetFileAttributes (win32_name) == INVALID_FILE_ATTRIBUTES
+ || delete_on_close_ok)
goto ok; /* The file is either gone already or will eventually be
deleted by the OS. */
}