summaryrefslogtreecommitdiffstats
path: root/src/H5Oattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Oattr.c')
-rw-r--r--src/H5Oattr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index b1e5ed3..3e0b757 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -833,7 +833,8 @@ H5O_attr_copy_file(H5F_t UNUSED *file_src, const H5O_msg_class_t UNUSED *mesg_ty
} /* end if(attr_src->data) */
/* Recompute the version to encode the destination attribute */
- attr_dst->version = H5A_get_version(file_dst, attr_dst);
+ if(H5A_set_version(file_dst, attr_dst) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, NULL, "unable to update attribute version")
/* Indicate that the fill values aren't to be written out */
attr_dst->initialized = TRUE;