2005-10-19 Christopher Faylor <cgf@timesys.com>
+ * times.cc (utimes): Only consider fds opened with write access.
+
+2005-10-19 Christopher Faylor <cgf@timesys.com>
+
* fhandler_disk_file.cc (fhandler_base::utimes_fs): Use existing handle
if fhandler has one.
* times.cc (utimes): Scan open fds for matching paths and use existing
cygheap_fdenum cfd;
while (cfd.next () >= 0)
- if (strcmp (cfd->get_win32_name (), win32) == 0)
+ if (cfd->get_access () & (FILE_WRITE_ATTRIBUTES | GENERIC_WRITE)
+ && strcmp (cfd->get_win32_name (), win32) == 0)
{
fh = cfd;
fromfd = true;