summaryrefslogtreecommitdiffstats
path: root/src/H5Gname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Gname.c')
-rw-r--r--src/H5Gname.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/H5Gname.c b/src/H5Gname.c
index 381518a..eb9cf10 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -819,12 +819,21 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
break;
case H5I_DATATYPE:
- /* Avoid non-named datatypes */
- if(!H5T_is_named((H5T_t *)obj_ptr))
- HGOTO_DONE(SUCCEED) /* Do not exit search over IDs */
+ {
+ H5T_t *type = NULL;
- oloc = H5T_oloc((H5T_t *)obj_ptr);
- obj_path = H5T_nameof((H5T_t *)obj_ptr);
+ /* Get the actual datatype object that should be the vol_obj */
+ if(NULL == (type = (H5T_t *)H5T_get_named_type((H5T_t*)obj_ptr)))
+ HGOTO_DONE(SUCCEED) /* Do not exit search over IDs */
+
+ /* Avoid non-named datatypes */
+ if(!H5T_is_named(type))
+ HGOTO_DONE(SUCCEED) /* Do not exit search over IDs */
+
+ oloc = H5T_oloc(type);
+ obj_path = H5T_nameof(type);
+ break;
+ }
break;
case H5I_UNINIT: