summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2016-07-04 04:06:34 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2016-07-04 04:06:34 (GMT)
commitaf0829aa171bddb63fa67ee7f7470e661815c24d (patch)
treecc8972cb23f3b1a4bab55317e8974cdf3af67c1f /src/H5Dint.c
parent4f967d5029cd8e0080f5637efd403842394f87d0 (diff)
downloadhdf5-af0829aa171bddb63fa67ee7f7470e661815c24d.zip
hdf5-af0829aa171bddb63fa67ee7f7470e661815c24d.tar.gz
hdf5-af0829aa171bddb63fa67ee7f7470e661815c24d.tar.bz2
[svn-r30143] Fix for HDFFV-9940.
Tested on jam, osx1010test, moohan, platypus, emu, kite, kituo, mayll, ostrich, quail.
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r--src/H5Dint.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 6f088af..8a00be2 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -683,6 +683,11 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
if((dset->shared->type = H5T_copy(type, H5T_COPY_ALL)) == NULL)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy datatype")
+ /* Convert a datatype (if committed) to a transient type if the committed datatype's file
+ location is different from the file location where the dataset will be created */
+ if(H5T_convert_committed_datatype(dset->shared->type, file) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get shared datatype info")
+
/* Mark any datatypes as being on disk now */
if(H5T_set_loc(dset->shared->type, file, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't set datatype location")