Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
avoid // in path otherwise libarchive won't apply properly the mode
Baptiste Daroussin committed 11 years ago
commit 9e806e3f5ce8ecd4df9dc45190a26ae74eedbce5
parent 019f757
1 file changed +2 -2
modified libpkg/pkg_add.c
@@ -167,8 +167,8 @@ do_extract(struct archive *a, struct archive_entry *ae, const char *location,
		rf = NULL;
		rcf = NULL;
		pkg_absolutepath(archive_entry_pathname(ae), path, sizeof(path));
-
		snprintf(pathname, sizeof(pathname), "%s/%s",
-
		    location ? location : "",
+
		snprintf(pathname, sizeof(pathname), "%s%s%s",
+
		    location ? location : "", *path == '/' ? "" : "/",
		    path
		);
		strlcpy(rpath, pathname, sizeof(rpath));