Patch from Bastian Blank to fix debian bug #226722, test case:

mkdir foo
 touch foo/bar
 ln -s bar foo/baz
This commit is contained in:
Glenn L McGrath 2004-01-08 10:51:09 +00:00
parent 1f28b90a9c
commit 95f75a3dcd

View File

@ -73,8 +73,7 @@ extern int ln_main(int argc, char **argv)
free(src_name);
src_name = src;
}
if (stat(*argv, &statbuf)) {
if (!(flag & LN_SYMLINK) && stat(*argv, &statbuf)) {
bb_perror_msg(*argv);
status = EXIT_FAILURE;
free(src_name);
@ -101,13 +100,3 @@ extern int ln_main(int argc, char **argv)
return status;
}