commit | a211649cfdd29e2e0f7c078e0417c3baa4aafecf | [log] [tgz] |
---|---|---|
author | Michael Forney <mforney@mforney.org> | Fri Jul 08 10:24:10 2016 -0700 |
committer | sin <sin@2f30.org> | Sat Jul 09 10:17:16 2016 +0100 |
tree | 93452ad04634a4a3f487c42eea34fb32ea686fca | |
parent | 083d1451ac5fa87172ea3c78adcbe2768377d2e8 [diff] |
ln: Only fail if same inode without -f flag
diff --git a/ln.c b/ln.c index ab1ec4e..f62068a 100644 --- a/ln.c +++ b/ln.c
@@ -77,9 +77,11 @@ 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; } }