commit 21ea386440121f0de84e160d9ed82e68a65a858e
parent 729df539096d3eb3edc288389f8d623100b20bce
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Sun, 5 Sep 2021 22:29:26 -0700
Fix installation program creating truncated top-level directories
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/module.c b/lib/module.c
@@ -145,10 +145,11 @@ usage:
arglen = 0;
while ((ent = fts_read(fts))) {
- if (!argtoo && ent->fts_level == 0 && ent->fts_info == FTS_D) {
+ if (!argtoo && ent->fts_level == 0 && ent->fts_info == FTS_D) {
arglen = strlen(ent->fts_path);
if (ent->fts_path[arglen - 1] != '/')
++arglen;
+ continue;
}
if (snprintf(new, sizeof(new), "%s/%s", prefix, ent->fts_path + arglen) >= sizeof(new)) {
errno = ENAMETOOLONG;