mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(do_link): Warn that making a hard link to a symbolic link is not portable.
This commit is contained in:
1 parent
7876eafaa1
commit
224fff6a3a
1 file changed
+7
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user