Hi,
In cp.c (fileutils 4.0):
[...]
if (x->preserve_timestamps)
{
struct utimbuf utb;
/* There's currently no interface to set file timestamps with
better than 1-second resolution, so discard any fractional
part of the source timestamp. */
[...]
You should round upwards, otherwise "cp -pu" doesn't work as expected:
$ touch blah2
$ touch blah1
zsh: correct 'blah1' to 'blah2' [nyae]? n
$ ls -l blah1 blah2
-rw-r--r-- 1 vlefevre lip 0 Oct 11 14:23 blah1
-rw-r--r-- 1 vlefevre lip 0 Oct 11 14:23 blah2
$ \cp -puv blah1 blah2
blah1 -> blah2
$ \cp -puv blah1 blah2
blah1 -> blah2
$ touch blah2
$ \cp -puv blah1 blah2
$ \cp --version
cp (GNU fileutils) 4.0
$ uname -a
SunOS vin 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-5_10
The second cp shouldn't have copied anything.
Regards,
--
Vincent Lef�vre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Math�matiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / PolKA research team at LORIA
_______________________________________________
Bug-fileutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-fileutils