From 5c46e766b0f919ac5c347ba2fc22884dcd34d58a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 1 Sep 2001 13:26:41 +0000 Subject: (get_link_name): Restore error-handling that was removed by preceding delta. --- src/ls.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2