diff options
-rw-r--r-- | usr.bin/xinstall/xinstall.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index a4c8da5..2889bab 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "From: @(#)xinstall.c 8.1 (Berkeley) 7/21/93"; #endif static const char rcsid[] = - "$Id: xinstall.c,v 1.23 1997/05/24 05:39:19 peter Exp $"; + "$Id: xinstall.c,v 1.24 1997/08/27 06:29:23 charnier Exp $"; #endif /* not lint */ /*- @@ -388,9 +388,17 @@ install(from_name, to_name, fset, flags) (void)close(from_fd); } - if (dostrip) + if (dostrip) { + (void)close(to_fd); + strip(to_name); + /* Reopen target. */ + to_fd = open(to_name, O_RDWR, 0); + if (to_fd < 0) + err(EX_OSERR, "%s", to_name); + } + /* * Unfortunately, because we strip the installed file and not the * original one, it is impossible to do the comparison without |