diff options
Diffstat (limited to 'src/H5Gtest.c')
-rw-r--r-- | src/H5Gtest.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/H5Gtest.c b/src/H5Gtest.c index 2b5d32a..4bd87f5 100644 --- a/src/H5Gtest.c +++ b/src/H5Gtest.c @@ -36,6 +36,7 @@ #include "H5Gpkg.h" /* Groups */ #include "H5HLprivate.h" /* Local Heaps */ #include "H5Iprivate.h" /* IDs */ +#include "H5VLprivate.h" /* Virtual Object Layer */ /****************/ /* Local Macros */ @@ -537,12 +538,18 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign break; case H5I_DATATYPE: - /* Avoid non-named datatypes */ - if(!H5T_is_named((H5T_t *)obj_ptr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a named datatype") - - obj_path = H5T_nameof((H5T_t *)obj_ptr); - break; + { + H5T_t *type = NULL; + + /* 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_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a named datatype") + /* Avoid non-named datatypes */ + if(!H5T_is_named(type)) + HGOTO_DONE(SUCCEED) /* Do not exit search over IDs */ + obj_path = H5T_nameof(type); + break; + } case H5I_UNINIT: case H5I_BADID: |