summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMuqun Yang <myang6@hdfgroup.org>2020-02-06 01:16:16 (GMT)
committerMuqun Yang <myang6@hdfgroup.org>2020-02-06 01:16:16 (GMT)
commit2d5fa49adcfb405db6b5afb8eb4bad048fa6d2eb (patch)
tree6f18103de4c1cb73986684f305825002a6f5157b /tools
parentcdcd259bf4e7539b4dff8d7bcaa7d8c73be33e59 (diff)
downloadhdf5-2d5fa49adcfb405db6b5afb8eb4bad048fa6d2eb.zip
hdf5-2d5fa49adcfb405db6b5afb8eb4bad048fa6d2eb.tar.gz
hdf5-2d5fa49adcfb405db6b5afb8eb4bad048fa6d2eb.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.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5repack/h5repack_refs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index fc9e897..48033a2 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -532,9 +532,15 @@ 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-05
+ */
+ 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)