sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit a211649cfdd29e2e0f7c078e0417c3baa4aafecf
parent 083d1451ac5fa87172ea3c78adcbe2768377d2e8
Author: Michael Forney <mforney@mforney.org>
Date:   Fri,  8 Jul 2016 10:24:10 -0700

ln: Only fail if same inode without -f flag

Diffstat:
Mln.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ln.c b/ln.c @@ -77,9 +77,11 @@ main(int argc, char *argv[]) continue; } } else if (st.st_dev == tst.st_dev && st.st_ino == tst.st_ino) { - weprintf("%s and %s/%s are the same file\n", - *argv, targetdir, target); - ret = 1; + if (!fflag) { + weprintf("%s and %s/%s are the same file\n", + *argv, targetdir, target); + ret = 1; + } continue; } }