diff options
author | Jim Meyering <jim@meyering.net> | 1999-11-07 11:07:53 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-11-07 11:07:53 +0000 |
commit | 224fff6a3a026124d8efb07f8b66645b8901832e (patch) | |
tree | 1155755e816155069b463962999efecaca2fad18 | |
parent | 7876eafaa1476a73cbd4270a2dfe084ba1cfdaa6 (diff) | |
download | coreutils-224fff6a3a026124d8efb07f8b66645b8901832e.tar.xz |
(do_link): Warn that making a hard link to a symbolic link is not portable.
-rw-r--r-- | src/ln.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |