diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-04-02 15:29:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-04-02 15:29:35 (GMT) |
commit | d165e1d8e7c01f201dcb228464064a8f8e50174b (patch) | |
tree | d1bf770d9e425bb2f7bc264e83abb7f7baa2d777 /src/H5G.c | |
parent | ea7a5346d7a7387a627142bd3a1e7b597f2c4a6d (diff) | |
download | hdf5-d165e1d8e7c01f201dcb228464064a8f8e50174b.zip hdf5-d165e1d8e7c01f201dcb228464064a8f8e50174b.tar.gz hdf5-d165e1d8e7c01f201dcb228464064a8f8e50174b.tar.bz2 |
[svn-r12191] Purpose:
Bug fix
Description:
Correct the handling of the group creation property list when copying
objects with the "create intermediate groups" flag.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest (once I pay attention to the compiler
warnings... :-)
Diffstat (limited to 'src/H5G.c')
-rw-r--r-- | src/H5G.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -3013,7 +3013,7 @@ H5G_copy(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_t pli if(H5O_copy_header(src_loc->oloc, &new_oloc, dxpl_id, cpy_option) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") - /* create group creatiion property to create missing groups */ + /* Create group creatiion property to create missing groups */ if((cpy_option & H5G_COPY_CREATE_INTERMEDIATE_GROUP_FLAG) > 0) { if(NULL == (gcrt_class = H5I_object_verify(H5P_GROUP_CREATE, H5I_GENPROP_CLS))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class"); @@ -3022,15 +3022,17 @@ H5G_copy(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_t pli if((gcplist_id = H5P_create_id(gcrt_class)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list"); gcplist_created = TRUE; - - if(H5P_set(gcplist_id, H5G_CRT_INTERMEDIATE_GROUP_NAME, &cpy_option) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set intermediate group creation flag") } else - plist_id = H5P_GROUP_CREATE_DEFAULT; + gcplist_id = H5P_GROUP_CREATE_DEFAULT; - if(NULL == (gcrt_plist = H5I_object(plist_id))) + if(NULL == (gcrt_plist = H5I_object(gcplist_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + /* Set the intermediate group creation property, if requested */ + if(gcplist_created) + if(H5P_set(gcrt_plist, H5G_CRT_INTERMEDIATE_GROUP_NAME, &cpy_option) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set intermediate group creation flag") + /* Insert the new object in the destination file's group */ if(H5G_insert(dst_loc, dst_name, &new_loc, dxpl_id, gcrt_plist) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert the name") |