diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2012-03-28 21:02:30 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2012-03-28 21:02:30 (GMT) |
commit | 84487458917a55d39171cb4607178e4ba25a208d (patch) | |
tree | d2f6e5966d1daa5a59a5f38dd6ff0c1cc994debc /src/H5Oattribute.c | |
parent | 35a0e27e885e63c40449483733c105649e3c99dc (diff) | |
download | hdf5-84487458917a55d39171cb4607178e4ba25a208d.zip hdf5-84487458917a55d39171cb4607178e4ba25a208d.tar.gz hdf5-84487458917a55d39171cb4607178e4ba25a208d.tar.bz2 |
[svn-r22173] Purpose: Fix HDFFV-7762
Description:
When copying an object with attribute creation order tracked, the attribute
creation order was not copied correctly to the destination file, causing an
error if the creation order was also indexed (due to attempting to insert
duplicate keys) or incorrect creation orders otherwise. Fixed to copy the
creation order correctly.
Also fixed the attribute character set not being copied, and fixed an issue
where an attribute opened with H5Aopen (or similar, but not by_idx), from an
object using the latest format but without creation order being tracked, would
always report the creation order as 0 (and marked as valid).
Tested: jam, koala, ostrich (h5committest), durandal
Diffstat (limited to 'src/H5Oattribute.c')
-rw-r--r-- | src/H5Oattribute.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index 5778dc1..055fb69 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -434,8 +434,10 @@ H5O_attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence, if(NULL == (udata->attr = H5A_copy(NULL, (H5A_t *)mesg->native))) HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy attribute") - /* Assign [somewhat arbitrary] creation order value, for older versions of the format */ - if(oh->version == H5O_VERSION_1) + /* Assign [somewhat arbitrary] creation order value, for older versions + * of the format or if creation order is not tracked */ + if(oh->version == H5O_VERSION_1 + || !(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)) udata->attr->shared->crt_idx = sequence; /* Stop iterating */ |