If one of the directories in the list doesn't exist and no filenames are
passed in because opendir fails and then the code gets an error. opendir()
failing should not be a fatal error. The function should just move on to
the next directory.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19400
dc483132-0cff-0310-8789-
dd5450dbe970
} else {
/* load all plugins in each directory */
#ifndef _WIN32
- DIR *dir = NULL;
+ DIR *dir = opendir (dirnames[i]);
- if (!err) {
- dir = opendir(dirnames[i]);
- if (dir == NULL) {
- err = errno;
- Tprintf ("-> error %d/%s\n", err, strerror (err));
- }
- }
-
- while (!err) {
+ while (dir != NULL && !err) {
struct dirent *d = NULL;
char *filepath = NULL;
struct plugin_file_handle *handle = NULL;