From e6ebb8d8a87776f72f5b44ae7ea185211b46c042 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 8 Oct 2000 09:17:56 +0000 Subject: [PATCH] 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. --- usr.bin/xinstall/xinstall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 87c0b1c2bd07..f46f3326e152 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -434,8 +434,8 @@ different: printf("install: %s -> %s\n", from_name, old_to_name); if (dopreserve && stat(from_name, ×tamp_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: