projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7876eaf
)
(do_link): Warn that making a hard link to a symbolic link is not portable.
author
Jim Meyering
<jim@meyering.net>
Sun, 7 Nov 1999 11:07:53 +0000
(11:07 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sun, 7 Nov 1999 11:07:53 +0000
(11:07 +0000)
src/ln.c
patch
|
blob
|
history
diff --git
a/src/ln.c
b/src/ln.c
index 5307d67cc08bcc8990bbb9d6a267f6dd7fd46f1b..759c450b328c724ebead1ec5a218daecd022f384 100644
(file)
--- 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);