diff options
author | Jim Meyering <jim@meyering.net> | 1994-07-30 16:34:17 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-07-30 16:34:17 +0000 |
commit | 32bd426778e4d37e233fe06ce66eb72b4a84c883 (patch) | |
tree | 81eae5822f0dba853b9116c074fb3a2a55ba8faa /src/ls.c | |
parent | a272d8b0c6e62937ef7b69e3ca750e34fd3e3152 (diff) | |
download | coreutils-32bd426778e4d37e233fe06ce66eb72b4a84c883.tar.xz |
.
Diffstat (limited to 'src/ls.c')
-rw-r--r-- | src/ls.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -60,6 +60,8 @@ #include "ls.h" #include "version.h" +#include "safe-stat.h" +#include "safe-lstat.h" #ifndef S_IEXEC #define S_IEXEC S_IXUSR @@ -992,14 +994,14 @@ gobble_file (name, explicit_arg, dirname) if (trace_links) { - val = stat (path, &files[files_index].stat); + val = SAFE_STAT (path, &files[files_index].stat); if (val < 0) /* Perhaps a symbolically-linked to file doesn't exist; stat the link instead. */ - val = lstat (path, &files[files_index].stat); + val = SAFE_LSTAT (path, &files[files_index].stat); } else - val = lstat (path, &files[files_index].stat); + val = SAFE_LSTAT (path, &files[files_index].stat); if (val < 0) { error (0, errno, "%s", path); @@ -1022,7 +1024,7 @@ gobble_file (name, explicit_arg, dirname) if (linkpath && ((explicit_arg && format != long_format) || indicator_style != none) - && stat (linkpath, &linkstats) == 0) + && SAFE_STAT (linkpath, &linkstats) == 0) { /* Symbolic links to directories that are mentioned on the command line are automatically traced if not being |