diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-03-16 23:30:21 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-03-16 23:30:21 -0400 |
commit | 4da8ba603b588bef38f772c18d883fbf5ddc9e65 (patch) | |
tree | 583b6182ebc22baf1c1ce39a4686da0375ff0f04 /eval.c | |
parent | c85f569daf3e0e99c9e8941d0234711afdb58cd7 (diff) | |
download | bfs-4da8ba603b588bef38f772c18d883fbf5ddc9e65.tar.xz |
Color link targets for -ls
Fixes #18.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -760,13 +760,7 @@ bool eval_fls(const struct expr *expr, struct eval_state *state) { } if (ftwbuf->typeflag == BFTW_LNK) { - char *target = xreadlinkat(ftwbuf->at_fd, ftwbuf->at_path, statbuf->st_size); - if (!target) { - goto error; - } - int ret = fprintf(file, " -> %s", target); - free(target); - if (ret < 0) { + if (cfprintf(cfile, " -> %L", ftwbuf) < 0) { goto error; } } |