summaryrefslogtreecommitdiff
path: root/src/ln.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-11-07 11:04:00 +0000
committerJim Meyering <jim@meyering.net>1999-11-07 11:04:00 +0000
commit7876eafaa1476a73cbd4270a2dfe084ba1cfdaa6 (patch)
tree0825ae2209acfadf0f75ecc5d0d1f84583c91db3 /src/ln.c
parent8040d4c680d3d5ebde8af6276e7df046eae50154 (diff)
downloadcoreutils-7876eafaa1476a73cbd4270a2dfe084ba1cfdaa6.tar.xz
Remove entire #if LINK_FOLLOWS_SYMLINKS block.
Diffstat (limited to 'src/ln.c')
-rw-r--r--src/ln.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/ln.c b/src/ln.c
index 228f3ee41..5307d67cc 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -160,26 +160,8 @@ do_link (const char *source, const char *dest)
{
if (STAT_LIKE_LINK (source, &source_stats) != 0)
{
-#if LINK_FOLLOWS_SYMLINKS
- /* This still could be a legitimate request:
- if SOURCE is a dangling symlink. */
- if (errno == ENOENT && lstat (source, &source_stats) == 0)
- {
- /* Allow a hard link to a dangling symlink. */
- /* But here's a little explanation before I remove the whole
- enclosing #if block:
-
- On systems where LINK_FOLLOWS_SYMLINKS, it is not possible
- to create a hard link to a dangling symlink, so the test above
- would be pointless.
- */
- }
- else
-#endif
- {
- error (0, errno, "%s", source);
- return 1;
- }
+ error (0, errno, "%s", source);
+ return 1;
}
if (!hard_dir_link && S_ISDIR (source_stats.st_mode))