diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-30 14:33:14 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-30 14:33:14 (GMT) |
commit | 12edb97078593e2aa73950919c4823a37367915e (patch) | |
tree | 1b3756ce8c00a2abe41273fcb32ae4700351b2d2 /src/H5Gtraverse.c | |
parent | b27b4889268552a1b02f06e5c26b470c31621d5e (diff) | |
download | hdf5-12edb97078593e2aa73950919c4823a37367915e.zip hdf5-12edb97078593e2aa73950919c4823a37367915e.tar.gz hdf5-12edb97078593e2aa73950919c4823a37367915e.tar.bz2 |
[svn-r12825] Description:
Rudimentary support for creating creation order index (but not inserting
links in it yet).
Testedon:
Mac OS X/32 10.4.8 (amazon)
Diffstat (limited to 'src/H5Gtraverse.c')
-rw-r--r-- | src/H5Gtraverse.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index 0020377..68e8dfc 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -651,6 +651,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, /* If an intermediate group doesn't exist & flag is set, create the group */ if(target & H5G_CRT_INTMD_GROUP) { H5O_ginfo_t ginfo; /* Group info message for parent group */ + H5O_linfo_t linfo; /* Link info message for parent group */ /* Get the group info for parent group */ /* (OK if not found) */ @@ -664,9 +665,21 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, HDmemcpy(&ginfo, &def_ginfo, sizeof(H5O_ginfo_t)); } /* end if */ + /* Get the link info for parent group */ + /* (OK if not found) */ + if(NULL == H5O_read(grp_loc.oloc, H5O_LINFO_ID, 0, &linfo, dxpl_id)) { + H5O_linfo_t def_linfo = H5G_CRT_LINK_INFO_DEF; + + /* Clear error stack from not finding the link info message */ + H5E_clear_stack(NULL); + + /* Use default link info settings */ + HDmemcpy(&linfo, &def_linfo, sizeof(H5O_linfo_t)); + } /* end if */ + /* Create the intermediate group */ /* XXX: Should we allow user to control the group creation params here? -QAK */ - if(H5G_obj_create(grp_oloc.file, dxpl_id, &ginfo, obj_loc.oloc/*out*/) < 0) + if(H5G_obj_create(grp_oloc.file, dxpl_id, &ginfo, &linfo, obj_loc.oloc/*out*/) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry") /* Insert new group into current group's symbol table */ |