Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix dirrm and dirrmtry for directories beginning with a /
Baptiste Daroussin committed 14 years ago
commit cf7a55adecbb04918c8b5aef0ddc44fe1a8fbd14
parent 1840303
1 file changed +4 -1
modified libpkg/pkg_ports.c
@@ -198,7 +198,10 @@ ports_parse_plist(struct pkg *pkg, char *plist)
					len--;
				}

-
				snprintf(path, sizeof(path), "%s%s%s/", prefix, slash, buf);
+
				if (path[0] == '/')
+
					snprintf(path, sizeof(path), "%s/", buf);
+
				else
+
					snprintf(path, sizeof(path), "%s%s%s/", prefix, slash, buf);


				if (plist_p[6] == 't') {