summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-02-14 03:47:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-02-14 03:47:51 (GMT)
commit74754706cf030fd4a23d8b08c69696f633e92239 (patch)
treee254c7106d6f95d0557615c7e045567aee004fd6 /src
parenta5662c497884c2d182294b9aceabe3cbded28358 (diff)
downloadhdf5-74754706cf030fd4a23d8b08c69696f633e92239.zip
hdf5-74754706cf030fd4a23d8b08c69696f633e92239.tar.gz
hdf5-74754706cf030fd4a23d8b08c69696f633e92239.tar.bz2
[svn-r13295] Description:
Fix bug in "create intermediate groups" code which was carrying too much information from parent to child group. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src')
-rw-r--r--src/H5Gtraverse.c11
-rw-r--r--src/H5Oprivate.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index ecbbab5..a7978c6 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -696,6 +696,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
const H5O_linfo_t def_linfo = H5G_CRT_LINK_INFO_DEF; /* Default link info settings */
H5O_ginfo_t par_ginfo; /* Group info settings for parent group */
H5O_linfo_t par_linfo; /* Link info settings for parent group */
+ H5O_linfo_t tmp_linfo; /* Temporary link info settings */
const H5O_ginfo_t *ginfo; /* Group info settings for new group */
const H5O_linfo_t *linfo; /* Link info settings for new group */
@@ -720,8 +721,14 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
/* Use default link info settings */
linfo = &def_linfo;
} /* end if */
- else
- linfo = &par_linfo;
+ else {
+ /* Only keep the index_corder information from the parent
+ * group's link info
+ */
+ HDmemcpy(&tmp_linfo, &def_linfo, sizeof(H5O_linfo_t));
+ tmp_linfo.index_corder = par_linfo.index_corder;
+ linfo = &tmp_linfo;
+ } /* end else */
/* Create the intermediate group */
/* XXX: Should we allow user to control the group creation params here? -QAK */
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 9acf7a6..ef18518 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -169,6 +169,8 @@ typedef struct H5O_shared_t {
* (Data structure in memory)
* (if the fields in this struct are changed, remember to change the default
* link info structure in src/H5Gprivate.h - QAK)
+ * (if the fields in this struct are changed, also look at the code that
+ * creates intermediate groups in src/H5Gtraverse.c - QAK)
*/
typedef struct H5O_linfo_t {
/* (creation order info) */