From cd88eaa5b4190b1dfdf90eb3579ca68070e0c8ef Mon Sep 17 00:00:00 2001 From: Eugene Grosbein Date: Fri, 10 Jul 2020 17:42:22 +0000 Subject: [PATCH] install(1): addition to r363067 Also, make it not break if STRIPBIN points to strip version without -o support and destination does not exist before installing. Reported by: lwhsu MFC after: 1 month X-MFC-With: 363064 --- usr.bin/xinstall/xinstall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 1ce0e2ee4a6..fe1a00c5730 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -1350,9 +1350,9 @@ strip(const char *to_name, const char *from_name, char **dresp) /* NOTREACHED */ } if (status != 0) { - (void)unlink(to_name); if (from_name != NULL) return (0); + (void)unlink(to_name); errx(EX_SOFTWARE, "strip command %s failed on %s", stripbin, to_name); }