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 | |
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')
-rw-r--r-- | src/H5G.c | 14 | ||||
-rw-r--r-- | src/H5Odtype.c | 2 | ||||
-rw-r--r-- | src/H5Opline.c | 2 |
3 files changed, 10 insertions, 8 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") diff --git a/src/H5Odtype.c b/src/H5Odtype.c index 876d190..9f44924 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -1216,7 +1216,7 @@ H5O_dtype_set_share(H5F_t UNUSED *f, void *_mesg/*in,out*/, *------------------------------------------------------------------------- */ static herr_t -H5O_dtype_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t *type, void *mesg_src, void *_udata) +H5O_dtype_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t UNUSED *type, void *mesg_src, void *_udata) { H5T_t *dt_src = (H5T_t *)mesg_src; /* Source datatype */ H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */ diff --git a/src/H5Opline.c b/src/H5Opline.c index 7746987..d27cfb2 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -441,7 +441,7 @@ H5O_pline_free (void *mesg) *------------------------------------------------------------------------- */ static herr_t -H5O_pline_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t *type, void *mesg_src, void *_udata) +H5O_pline_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t UNUSED *type, void *mesg_src, void *_udata) { H5O_pline_t *pline_src = (H5O_pline_t *)mesg_src; /* Source datatype */ H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */ |