]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: chown: make sure ctime gets updated when necessary
authorKen Brown <kbrown@cornell.edu>
Tue, 26 Jan 2021 02:05:37 +0000 (21:05 -0500)
committerKen Brown <kbrown@cornell.edu>
Tue, 26 Jan 2021 02:07:53 +0000 (21:07 -0500)
commitb32f6dd40a2764aed1baec35da0a7512f3fbceb3
tree3a2b1ae626759c0d1b62ed0bd3635a5e91a2fd05
parentf4cac1217e76b30afb55e680a909fa8a62b6088e
Cygwin: chown: make sure ctime gets updated when necessary

Following POSIX, ensure that ctime is updated if chown succeeds,
unless the new owner is specified as (uid_t)-1 and the new group is
specified as (gid_t)-1.  Previously, ctime was unchanged whenever the
owner and group were both unchanged.

Aside from POSIX compliance, this fix makes gnulib report that chown
works on Cygwin.  This improves the efficiency of packages like GNU
tar that use gnulib's chown module.  Previously such packages would
use a gnulib replacement for chown on Cygwin.
winsup/cygwin/fhandler_disk_file.cc
This page took 0.029197 seconds and 5 git commands to generate.