summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-08-18 17:57:04 +0200
committerLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-08-18 17:57:04 +0200
commitae10f919739b7634a2afad00a081998239684c6b (patch)
tree675836d1fc990d756b431a9f058eab1346cac2e9 /src
parentc08eb8f347ee9a40594bdab64447baae10f39168 (diff)
boom: show symlinks
Diffstat (limited to 'src')
-rw-r--r--src/boom.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/boom.c b/src/boom.c
index 279f0ca..96176f9 100644
--- a/src/boom.c
+++ b/src/boom.c
@@ -105,7 +105,13 @@ static int f(const char *fpath, const struct stat *, int typeflag, struct FTW *f
if (level != 0) {
printf("|-- ");
}
- puts(fname);
+ printf("%s", fname);
+ if (typeflag == FTW_SL) {
+ char real_name[PATH_MAX] = {0};
+ readlink(fpath, real_name, PATH_MAX);
+ printf(" -> %s", real_name);
+ }
+ printf("\n");
done:
prev_level = level;