Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix hardlinks in a directory that does not exist
Baptiste Daroussin committed 9 years ago
commit f2dae1ef8a96e21f68cac133c86da7d7683c700f
parent a51a183
1 file changed +2 -1
modified libpkg/pkg_add.c
@@ -459,7 +459,8 @@ retry:
	if (linkat(pkg->rootfd, RELATIVE_PATH(fh->temppath),
	    pkg->rootfd, RELATIVE_PATH(f->temppath), 0) == -1) {
		if (!tried_mkdir) {
-
			if (!mkdirat_p(pkg->rootfd, bsd_dirname(path)))
+
			if (!mkdirat_p(pkg->rootfd,
+
			    RELATIVE_PATH(bsd_dirname(f->path))))
				return (EPKG_FATAL);
			tried_mkdir = true;
			goto retry;