[Midnightbsd-cvs] src [12178] trunk/lib/libmport/create_primative.c: use the fake destdir when generating file path so we can create the package correctly when an absolute path is used.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Feb 18 19:28:19 EST 2019


Revision: 12178
          http://svnweb.midnightbsd.org/src/?rev=12178
Author:   laffer1
Date:     2019-02-18 19:28:18 -0500 (Mon, 18 Feb 2019)
Log Message:
-----------
use the fake destdir when generating file path so we can create the package correctly when an absolute path is used.

Modified Paths:
--------------
    trunk/lib/libmport/create_primative.c

Modified: trunk/lib/libmport/create_primative.c
===================================================================
--- trunk/lib/libmport/create_primative.c	2019-02-16 18:51:57 UTC (rev 12177)
+++ trunk/lib/libmport/create_primative.c	2019-02-19 00:28:18 UTC (rev 12178)
@@ -172,7 +172,7 @@
 		    e->type == ASSET_FILE_OWNER_MODE) {
 			/* Don't prepend cwd onto absolute file paths (this is useful for update) */
 			if (e->data[0] == '/') {
-				(void) strlcpy(file, e->data, FILENAME_MAX);
+				(void) snprintf(file, FILENAME_MAX, "%s%s", extra->sourcedir, e->data);
 			} else {
 				(void) snprintf(file, FILENAME_MAX, "%s/%s", cwd, e->data);
 			}



More information about the Midnightbsd-cvs mailing list