diff options
author | Rob Landley <rob@landley.net> | 2019-10-22 21:10:54 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-10-22 21:10:54 -0500 |
commit | 9eb72d920925b6b3ad0036ee2af790f0107f10c9 (patch) | |
tree | 7b3ce2b120c004948baf574a73efc8d66d44fa41 /toys/posix | |
parent | 289f7c50cfdd390a6c4979f5e115e0f064538115 (diff) | |
download | toybox-9eb72d920925b6b3ad0036ee2af790f0107f10c9.tar.gz |
JakeSFR on github pointed out that broken symlink relative detection was being
checked relative to the current directory, not from where the symlink lives.
Diffstat (limited to 'toys/posix')
-rw-r--r-- | toys/posix/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/file.c b/toys/posix/file.c index 5f18a539..063397ce 100644 --- a/toys/posix/file.c +++ b/toys/posix/file.c @@ -476,7 +476,7 @@ void file_main(void) char *lnk = xreadlink(name); sprintf(what = toybuf, "%ssymbolic link to %s", - stat(lnk, &sb) ? "broken " : "", lnk); + stat(name, &sb) ? "broken " : "", lnk); free(lnk); } xputs(what); |