[hackers] [sbase] ln: Only fail if same inode without -f flag || Michael Forney
 
commit a211649cfdd29e2e0f7c078e0417c3baa4aafecf
Author:     Michael Forney <mforney_AT_mforney.org>
AuthorDate: Fri Jul 8 10:24:10 2016 -0700
Commit:     sin <sin_AT_2f30.org>
CommitDate: Sat Jul 9 10:17:16 2016 +0100
    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
_AT_@ -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;
                         }
                 }
Received on Sat Jul 09 2016 - 11:17:21 CEST
This archive was generated by hypermail 2.3.0
: Sat Jul 09 2016 - 11:24:26 CEST