+
+ // Loop on any contained directory
+ if ((pluginDir->d_type == DT_DIR) && (pluginDir->d_name[0] != '.')) {
+ int fd = openat (dirfd, pluginDir->d_name, O_DIRECTORY);
+ char newpath[255];
+ strncpy (newpath, dirpath, sizeof(newpath));
+ strncat (newpath, "/", sizeof(newpath));
+ strncat (newpath, pluginDir->d_name, sizeof(newpath));
+
+ scanDirectory (newpath, fd, plugins, count);
+ close (fd);
+
+ } else {
+
+ // This is a file but not a plugin let's move to next directory element
+ if (!strstr (pluginDir->d_name, ".so")) continue;