diff options
author | Muqun Yang <myang6@hdfgroup.org> | 2020-02-07 21:26:30 (GMT) |
---|---|---|
committer | Muqun Yang <myang6@hdfgroup.org> | 2020-02-07 21:26:30 (GMT) |
commit | e5ae3101095db4b57fedf120c1dadbc257dd92c3 (patch) | |
tree | a4b8b398e770344afdc40f5e17299a9bd84507e8 /tools | |
parent | 021740bac0893a87c762959b284283bc236d0ab3 (diff) | |
parent | 1b937c69f4b8187401eeb8eef195bbcc2ea58312 (diff) | |
download | hdf5-e5ae3101095db4b57fedf120c1dadbc257dd92c3.zip hdf5-e5ae3101095db4b57fedf120c1dadbc257dd92c3.tar.gz hdf5-e5ae3101095db4b57fedf120c1dadbc257dd92c3.tar.bz2 |
Merge pull request #2361 in HDFFV/hdf5 from ~MYANG6/hdf5-develop:develop to develop
* commit '1b937c69f4b8187401eeb8eef195bbcc2ea58312':
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')
-rw-r--r-- | tools/src/h5repack/h5repack_refs.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index e6a747d..54fe1f2 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-07 + */ + 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) |