commit 1dd3b054dd3d8778debf24bb32cc61ff06e3ee42 from: Omar Polo date: Fri Mar 25 22:45:03 2022 UTC use a more readable strncmp to look for prefixes also while here stick an `else' before the second clausole. We're supposed to trim out only '> ' and ' ', but the missing else would also trim out ' ' after a '> '! commit - c00c1428ccaedc2d63d9d489c00d796d5718f615 commit + 1dd3b054dd3d8778debf24bb32cc61ff06e3ee42 blob - 9ce661e70cec13ade9907e5e2d49b0b438b77b2c blob + fec49729d25878f58d236fbfd1173a0dc341989d --- ctl.c +++ ctl.c @@ -307,13 +307,13 @@ show_load(struct parse_result *res, struct imsg *imsg, continue; line[linelen-1] = '\0'; file = line; - if (file[0] == '>' && file[1] == ' ') { + if (!strncmp(file, "> ", 2)) { file += 2; curr = i; - } - if (file[0] == ' ' && file[1] == ' ') + } else if (!strncmp(file, " ", 2)) file += 2; - if (file[0] == '.' && file[1] == '/') + + if (!strncmp(file, "./", 2)) file += 2; if (*file == '/')