ln: Only fail if same inode without -f flag
This commit is contained in:
parent
083d1451ac
commit
a211649cfd
8
ln.c
8
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user