Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Properly trim end spaces in plist for files and directories
Baptiste Daroussin committed 11 years ago
commit 9b7aa825744e9e808bb2e4b0bf1dd1b61e075f7e
parent bf4a9a6ec13824036c035ceba01076e5e30841b4
1 file changed +2 -2
modified libpkg/pkg_ports.c
@@ -275,7 +275,7 @@ meta_dirrm(struct plist *p, char *line, struct file_attr *a, bool try)
	len = strlen(line);

	while (isspace(line[len - 1]))
-
		line[len - 1] = '\0';
+
		line[--len] = '\0';

	if (line[0] == '/')
		snprintf(path, sizeof(path), "%s/", line);
@@ -344,7 +344,7 @@ file(struct plist *p, char *line, struct file_attr *a)
	len = strlen(line);

	while (isspace(line[len - 1]))
-
		line[len - 1] = '\0';
+
		line[--len] = '\0';

	if (line[0] == '/')
		snprintf(path, sizeof(path), "%s", line);