summaryrefslogtreecommitdiffstats
path: root/src/H5L.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5L.c')
-rw-r--r--src/H5L.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/H5L.c b/src/H5L.c
index 6ef6338..f3cebdc 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -2343,8 +2343,14 @@ H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
/* Get object type */
switch(lnk->type) {
case H5L_TYPE_HARD:
- if(H5G_UNKNOWN == (type = H5O_obj_type(obj_loc->oloc, udata->dxpl_id)))
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object type to move")
+ {
+ H5O_type_t obj_type; /* Type of object at location */
+
+ if(H5O_obj_type(obj_loc->oloc, &obj_type, udata->dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
+ if(H5G_UNKNOWN == (type = H5G_map_obj_type(obj_type)))
+ HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "unknown object type to move")
+ }
break;
case H5L_TYPE_SOFT: