Use the correct timestamp for the -C -p case when the comparison fails.

A garbage timestamp was used for at least installing /dev/null with -C -p
when the target doesn't already exist.
This commit is contained in:
Bruce Evans 2000-10-08 09:17:56 +00:00
parent cdb5588a50
commit e6ebb8d8a8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66813

View file

@ -434,8 +434,8 @@ install(from_name, to_name, fset, flags)
printf("install: %s -> %s\n",
from_name, old_to_name);
if (dopreserve && stat(from_name, &timestamp_sb) == 0) {
utb.actime = from_sb.st_atime;
utb.modtime = from_sb.st_mtime;
utb.actime = timestamp_sb.st_atime;
utb.modtime = timestamp_sb.st_mtime;
(void)utime(to_name, &utb);
}
moveit: