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;
|
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) {
|
||||||
weprintf("%s and %s/%s are the same file\n",
|
if (!fflag) {
|
||||||
*argv, targetdir, target);
|
weprintf("%s and %s/%s are the same file\n",
|
||||||
ret = 1;
|
*argv, targetdir, target);
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user