Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
During removal, if a directory was already removed by a bogus script, continue removing parents. This was causing leftover directories on japanese/font-* ports
Antoine Brodin committed 11 years ago
commit 622b317cd1c145387e20ab284fa6b4b5cfc2625d
parent b811ba6
1 file changed +3 -1
modified libpkg/pkg_delete.c
@@ -185,7 +185,9 @@ rmdir_p(struct pkgdb *db, struct pkg *pkg, char *dir, const char *prefix_r)
	if (unlinkat(pkg->rootfd, dir, AT_REMOVEDIR) == -1) {
		if (errno != ENOTEMPTY && errno != EBUSY)
			pkg_emit_errno("unlinkat", dir);
-
		return;
+
		/* If the directory was already removed by a bogus script, continue removing parents */
+
		if (errno != ENOENT)
+
			return;
	}

	/* No recursivity for packages out of the prefix */