summaryrefslogtreecommitdiff
path: root/src/ln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ln.c')
-rw-r--r--src/ln.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ln.c b/src/ln.c
index 5307d67cc..759c450b3 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -164,6 +164,13 @@ do_link (const char *source, const char *dest)
return 1;
}
+ if (S_ISLNK (source_stats.st_mode))
+ {
+ error (0, 0, _("%s: warning: making a hard link to a symbolic link\
+ is not portable"),
+ source);
+ }
+
if (!hard_dir_link && S_ISDIR (source_stats.st_mode))
{
error (0, 0, _("%s: hard link not allowed for directory"), source);