diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-11-07 17:08:08 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-11-07 17:08:08 +0000 |
commit | 39f7ae0616a39ec19467b54157b3db58b2db4cca (patch) | |
tree | 5d2e380eab6919da09ed68f55dcfa07e82c6402d /winsup/cygwin/times.cc | |
parent | 835cc311c3e01c672c12132b88b34c28f8a8524d (diff) | |
download | cygnal-39f7ae0616a39ec19467b54157b3db58b2db4cca.tar.gz cygnal-39f7ae0616a39ec19467b54157b3db58b2db4cca.tar.bz2 cygnal-39f7ae0616a39ec19467b54157b3db58b2db4cca.zip |
* times.cc (futimes): Redirect to utimes_worker if given file
descriptor is opened R/O.
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r-- | winsup/cygwin/times.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 22bd79684..3d762464f 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -513,8 +513,10 @@ futimes (int fd, const struct timeval *tvp) cygheap_fdget cfd (fd); if (cfd < 0) res = -1; - else + else if (cfd->get_access () & (FILE_WRITE_ATTRIBUTES | GENERIC_WRITE)) res = cfd->utimes (tvp); + else + res = utimes_worker (cfd->get_win32_name (), tvp, 1); syscall_printf ("%d = futimes (%d, %p)", res, fd, tvp); return res; } |