ln: Only fail if same inode without -f flag

This commit is contained in:
Michael Forney 2016-07-08 10:24:10 -07:00 committed by sin
parent 083d1451ac
commit a211649cfd

2
ln.c
View File

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