summaryrefslogtreecommitdiffstats
path: root/src/H5PLpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5PLpath.c')
-rw-r--r--src/H5PLpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 04248b5..5125839 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -673,12 +673,12 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
size_t len;
/* Allocate & initialize the path name */
- len = HDstrlen(dir) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(dp->d_name) + 1 /*\0*/;
+ len = HDstrlen(dir) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(dp->d_name) + 5 /*\0*/;
if (NULL == (path = (char *)H5MM_calloc(len)))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
- HDsnprintf(path, len, "%s/%s", dir, dp->d_name);
+ HDsnprintf(path, len, "%s%s%s", dir, H5PL_PATH_SEPARATOR, dp->d_name);
/* Get info for directory entry */
if (HDstat(path, &my_stat) == -1)