(remove_cwd_entries): Use CLOSEDIR, not closedir.

Give a diagnostic and fail if closedir fails.
This commit is contained in:
Jim Meyering
2002-08-28 06:52:07 +00:00
parent 3ee8ba25ba
commit cd79080f4a

View File

@@ -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;
}