Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jul 2020 17:42:23 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363081 - head/usr.bin/xinstall
Message-ID:  <202007101742.06AHgNNA022602@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eugen
Date: Fri Jul 10 17:42:22 2020
New Revision: 363081
URL: https://svnweb.freebsd.org/changeset/base/363081

Log:
  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

Modified:
  head/usr.bin/xinstall/xinstall.c

Modified: head/usr.bin/xinstall/xinstall.c
==============================================================================
--- head/usr.bin/xinstall/xinstall.c	Fri Jul 10 16:59:06 2020	(r363080)
+++ head/usr.bin/xinstall/xinstall.c	Fri Jul 10 17:42:22 2020	(r363081)
@@ -1350,9 +1350,9 @@ strip(const char *to_name, const char *from_name, char
 		/* 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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007101742.06AHgNNA022602>