Because it returns the result of the final sd_path_lookup() call rather than the return value of RET_GATHER,
it appears that it may return success even if an error occurs during processing.
With this patch, errors encountered during the loop will be properly tallied and returned, and failures will not be silently ignored.
Signed-off-by: anthisfan <gtpgx305@gmail.com>
printf("%s%s:%s %s\n", ansi_highlight(), t, ansi_normal(), p);
}
- return r;
+ return ret;
}
static int print_path(const char *n) {