mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
[svn-r13457] Fix problem on copying reg_ref attributes.
This commit is contained in:
parent
010ce9ac7b
commit
9679d64e16
@ -918,12 +918,13 @@ H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t UNUSED *mesg_type,
|
|||||||
size_t ref_count;
|
size_t ref_count;
|
||||||
|
|
||||||
/* Determine # of reference elements to copy */
|
/* Determine # of reference elements to copy */
|
||||||
ref_count = attr_dst->data_size / attr_dst->dt_size;
|
ref_count = attr_dst->data_size / H5T_get_size(attr_dst->dt);
|
||||||
|
|
||||||
/* Copy objects referenced in source buffer to destination file and set destination elements */
|
/* Copy objects referenced in source buffer to destination file and set destination elements */
|
||||||
if(H5O_copy_expand_ref(file_src, attr_src->data, dxpl_id,
|
if(H5O_copy_expand_ref(file_src, attr_src->data, dxpl_id,
|
||||||
file_dst, attr_dst->data, ref_count, H5T_get_ref_type(attr_src->dt), cpy_info) < 0)
|
file_dst, attr_dst->data, ref_count, H5T_get_ref_type(attr_src->dt), cpy_info) < 0)
|
||||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "unable to copy reference attribute")
|
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "unable to copy reference attribute")
|
||||||
|
|
||||||
} /* end if */
|
} /* end if */
|
||||||
else
|
else
|
||||||
/* Reset value to zero */
|
/* Reset value to zero */
|
||||||
|
Loading…
Reference in New Issue
Block a user