summaryrefslogtreecommitdiffstats
path: root/src/H5Dearray.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dearray.c')
-rw-r--r--src/H5Dearray.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index 5a90dd2..9f95b30 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -1316,10 +1316,13 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
HDassert(udata);
/* Check if the extensible array is open yet */
- if(NULL == idx_info->storage->u.earray.ea)
+ if(NULL == idx_info->storage->u.earray.ea) {
/* Open the extensible array in file */
if(H5D__earray_idx_open(idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array")
+ } else /* Patch the top level file pointer contained in ea if needed */
+ if(H5EA_patch_file(idx_info->storage->u.earray.ea, idx_info->f) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch earray file pointer")
/* Set convenience pointer to extensible array structure */
ea = idx_info->storage->u.earray.ea;
@@ -1729,6 +1732,11 @@ H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info)
/* Check if the extensible array is open */
if(idx_info->storage->u.earray.ea) {
+
+ /* Patch the top level file pointer contained in ea if needed */
+ if(H5EA_patch_file(idx_info->storage->u.earray.ea, idx_info->f) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch earray file pointer")
+
/* Close extensible array */
if(H5EA_close(idx_info->storage->u.earray.ea, idx_info->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array")