From 74754706cf030fd4a23d8b08c69696f633e92239 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 13 Feb 2007 22:47:51 -0500 Subject: [PATCH] [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) --- src/H5Gtraverse.c | 11 +++++++++-- src/H5Oprivate.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index ecbbab58c6..a7978c64bd 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 9acf7a607d..ef185188b9 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) */