(do_link): Warn that making a hard link to a symbolic link is not portable.

This commit is contained in:
Jim Meyering committed 1999-11-07 11:07:53 +00:00
1 parent 7876eafaa1
commit 224fff6a3a
1 file changed
+7
+7
View File
@@ -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);