diff options
author | Jim Meyering <jim@meyering.net> | 2002-08-28 06:52:07 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-08-28 06:52:07 +0000 |
commit | cd79080f4ab954f6a67be7b3d7d43b9526a2fe76 (patch) | |
tree | bb0653af856678fd86111b8d3ed6b21d96d7c701 /src | |
parent | 3ee8ba25ba11f59f095183d0345b42e59cd0f05f (diff) | |
download | coreutils-cd79080f4ab954f6a67be7b3d7d43b9526a2fe76.tar.xz |
(remove_cwd_entries): Use CLOSEDIR, not closedir.
Give a diagnostic and fail if closedir fails.
Diffstat (limited to 'src')
-rw-r--r-- | src/remove.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/remove.c b/src/remove.c index 59368ac09..f09184e35 100644 --- a/src/remove.c +++ b/src/remove.c @@ -871,7 +871,11 @@ remove_cwd_entries (char **subdir, struct stat *subdir_sb, break; } - closedir (dirp); + if (CLOSEDIR (dirp) != 0) + { + error (0, errno, _("reading directory %s"), quote (full_filename ("."))); + status = RM_ERROR; + } return status; } |