summaryrefslogtreecommitdiffstats
path: root/tools/src/h5repack
diff options
context:
space:
mode:
authorMuqun Yang <myang6@hdfgroup.org>2020-02-10 20:45:21 (GMT)
committerMuqun Yang <myang6@hdfgroup.org>2020-02-10 20:45:21 (GMT)
commit04d4d9c93a824b7a860993fc217c9cc497ac5441 (patch)
tree206f958d83977ca9af542fc2fbc044b58340bfa4 /tools/src/h5repack
parent233a8bb8a9cebba6fd06d2afd81ec4f13d92781b (diff)
downloadhdf5-04d4d9c93a824b7a860993fc217c9cc497ac5441.zip
hdf5-04d4d9c93a824b7a860993fc217c9cc497ac5441.tar.gz
hdf5-04d4d9c93a824b7a860993fc217c9cc497ac5441.tar.bz2
HDFFV-11014, fix the h5repack issue that misses a few attributes during the repacking. The flag that checks the object reference attribute is not updated properly. The fix is trivial. Just need to move the flag update line into the inner loop. Tested at Jelly. Also update the release.txt.
Diffstat (limited to 'tools/src/h5repack')
-rw-r--r--tools/src/h5repack/h5repack_refs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 7e8951f..f62ad74 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -530,9 +530,16 @@ static int copy_refs_attr(hid_t loc_in,
ref_comp_size = NULL;
}
}
+ /* This line below needs to be moved in this loop instead of inserting outside. Otherwise,
+ ref_comp_field_n may be >0 for the next attribute, which may not be
+ the reference type and will be accidently treated as the reference type.
+ It will then cause the H5Acreate2 failed since that attribute is already created.
+ KY 2020-02-10
+ */
+ is_ref_comp = (ref_comp_field_n > 0);
+
}
- is_ref_comp = (ref_comp_field_n > 0);
if (!(is_ref || is_ref_vlen || is_ref_array || is_ref_comp)) {
if (H5Tclose(mtype_id) < 0)