summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-09-01 13:26:41 +0000
committerJim Meyering <jim@meyering.net>2001-09-01 13:26:41 +0000
commit5c46e766b0f919ac5c347ba2fc22884dcd34d58a (patch)
tree5c4ae11629664062d804bddb03ed74dbc873a26e /src
parent678bbca816a7200aa31c533a0ac1f8fc35da0bd2 (diff)
downloadcoreutils-5c46e766b0f919ac5c347ba2fc22884dcd34d58a.tar.xz
(get_link_name): Restore error-handling that was removed by preceding delta.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ls.c b/src/ls.c
index aeaf4c7b9..420552ee0 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2141,6 +2141,12 @@ get_link_name (const char *filename, struct fileinfo *f)
size_t link_val_len;
f->linkname = xreadlink (filename, &link_val_len);
+ if (f->linkname == NULL)
+ {
+ error (0, errno, _("cannot read symbolic link %s"),
+ quotearg_colon (filename));
+ exit_status = 1;
+ }
}
/* If `linkname' is a relative path and `path' contains one or more