summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorGlenn L McGrath2004-01-08 10:51:09 +0000
committerGlenn L McGrath2004-01-08 10:51:09 +0000
commit95f75a3dcdbdf78fbb30d2a2e3e7777ee8ba1129 (patch)
tree52790a2243d4f0d526c54cad36744401a1337b23 /coreutils
parent1f28b90a9c934a2e56e50da279bfca136b802114 (diff)
downloadbusybox-95f75a3dcdbdf78fbb30d2a2e3e7777ee8ba1129.zip
busybox-95f75a3dcdbdf78fbb30d2a2e3e7777ee8ba1129.tar.gz
Patch from Bastian Blank to fix debian bug #226722, test case:
mkdir foo touch foo/bar ln -s bar foo/baz
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/ln.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/coreutils/ln.c b/coreutils/ln.c
index 0640c66..7c282b0 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -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;
}
-
-
-
-
-
-
-
-
-
-