ln: Only fail if same inode without -f flag
This commit is contained in:
parent
083d1451ac
commit
a211649cfd
2
ln.c
2
ln.c
|
@ -77,9 +77,11 @@ main(int argc, char *argv[])
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (st.st_dev == tst.st_dev && st.st_ino == tst.st_ino) {
|
} 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",
|
weprintf("%s and %s/%s are the same file\n",
|
||||||
*argv, targetdir, target);
|
*argv, targetdir, target);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user