diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-07-11 05:12:02 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-07-11 05:12:02 (GMT) |
commit | 2ba063c0a5d248c059f2422811beed76a2e624d8 (patch) | |
tree | 5f83aa9f5bf8f6c1f0a584f02eadfee9ba9cb304 /src/H5Ocopy.c | |
parent | 92de5e051f2f0ec6b7d846841adcaee7451881ec (diff) | |
download | hdf5-2ba063c0a5d248c059f2422811beed76a2e624d8.zip hdf5-2ba063c0a5d248c059f2422811beed76a2e624d8.tar.gz hdf5-2ba063c0a5d248c059f2422811beed76a2e624d8.tar.bz2 |
Fix for HDFFV-7853 H5Ocopy to 1.8 branch
Apply the fix for HDFFV-7853 H5Ocopy from develop to 1.8 branch.
This is the similar set of changes as in develop branch.
Some coding is added to do the copying because 1.8 does not flush out the
storage address when writing to a dataset.
Diffstat (limited to 'src/H5Ocopy.c')
-rw-r--r-- | src/H5Ocopy.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 9193a4c..31beb0e 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -357,24 +357,8 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, if((obj_class = H5O_obj_class(oloc_src, dxpl_id)) == NULL) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type") - /* Check if the object at the address is already open in the file */ - if(H5FO_opened(oloc_src->file, oloc_src->addr) != NULL) { - - H5G_loc_t tmp_loc; /* Location of object */ - H5O_loc_t tmp_oloc; /* Location of object */ - H5G_name_t tmp_path; /* Object's path */ - - tmp_loc.oloc = &tmp_oloc; - tmp_loc.path = &tmp_path; - tmp_oloc.file = oloc_src->file; - tmp_oloc.addr = oloc_src->addr; - tmp_oloc.holding_file = oloc_src->holding_file; - H5G_name_reset(tmp_loc.path); - - /* Flush the object of this class */ - if(obj_class->flush && obj_class->flush(&tmp_loc, dxpl_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object") - } + /* Set the pointer to the shared struct for the object if opened in the file */ + cpy_info->shared_fo = H5FO_opened(oloc_src->file, oloc_src->addr); /* Get source object header */ if(NULL == (oh_src = H5O_protect(oloc_src, dxpl_id, H5AC_READ))) |