Skip to content

Commit

Permalink
Fix loading plugin fails with missing directory GH issue #3248
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF committed Aug 2, 2023
1 parent a2bd42d commit c4f67c9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ New Features

Library:
--------
-
- Change the error handling for a not found path in the find plugin process.

While attempting to load a plugin the HDF5 library will fail if one of the
directories in the plugin paths does not exist, even if there are more paths
to check. Instead of exiting the function with an error, just logged the error
and continue processing the list of paths to check.


Parallel Library:
Expand Down
3 changes: 1 addition & 2 deletions src/H5PLpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,7 @@ H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool

/* Search for the plugin in this path */
if (H5PL__find_plugin_in_path(search_params, found, H5PL_paths_g[u], plugin_info) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in path %s encountered an error",
H5PL_paths_g[u])
HERROR(H5E_PLUGIN, H5E_CANTGET, "search in path %s encountered an error", H5PL_paths_g[u]);

/* Break out if found */
if (*found) {
Expand Down
6 changes: 6 additions & 0 deletions test/filter_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,12 @@ main(void)
else
my_fapl_id = old_ff_fapl_id;

/* Add extra path to check for correct error process */
if (H5PLprepend("bogus") < 0) {
fprintf(stderr, "Could not prepend path:bogus\n");
TEST_ERROR;
}

/* Reopen the file for testing data reading */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, my_fapl_id)) < 0)
TEST_ERROR;
Expand Down

0 comments on commit c4f67c9

Please sign in to comment.