aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toys/readlink.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/toys/readlink.c b/toys/readlink.c
index c602f78e..79fdea52 100644
--- a/toys/readlink.c
+++ b/toys/readlink.c
@@ -9,7 +9,12 @@
void readlink_main(void)
{
- char *s = xreadlink(*toys.optargs);
+ char *s;
+
+ // Calculating full cannonical path?
+
+ if (CFG_READLINK_F && toys.optflags) s = realpath(*toys.optargs, NULL);
+ else s = xreadlink(*toys.optargs);
if (s) {
xputs(s);