summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-08-29 16:58:58 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-08-29 16:58:58 (GMT)
commit9ada2de83a7a4038e4b3d0e500360eb38ee6ecaa (patch)
treedb7a65c1bffc65e3d16f2e1c2c236e8fc813d64d /src/H5G.c
parent969654ce4518e753b0055aed7613461be5bf5210 (diff)
downloadhdf5-9ada2de83a7a4038e4b3d0e500360eb38ee6ecaa.zip
hdf5-9ada2de83a7a4038e4b3d0e500360eb38ee6ecaa.tar.gz
hdf5-9ada2de83a7a4038e4b3d0e500360eb38ee6ecaa.tar.bz2
[svn-r50] ./src/H5G.c
Commented out H5G_basename(). Fixed a bug in H5G_namei() and H5G_insert(). ./src/H5O.c Fixed a bug in H5O_modify()
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/H5G.c b/src/H5G.c
index cccd34e..b1441c6 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -99,6 +99,7 @@ H5G_component (const char *name, size_t *size_p)
*
*-------------------------------------------------------------------------
*/
+#if 0
static const char *
H5G_basename (const char *name, size_t *size_p)
{
@@ -122,6 +123,7 @@ H5G_basename (const char *name, size_t *size_p)
if (size_p) *size_p = strcspn (s, "/");
return s;
}
+#endif
/*-------------------------------------------------------------------------
@@ -251,11 +253,11 @@ H5G_namei (hdf5_file_t *f, H5G_entry_t *cwd, const char *name,
aside = TRUE;
}
H5O_reset (H5O_NAME, &mesg);
+ } else {
+ /* component not found */
+ if (dir_ent) *dir_ent = *dir;
+ HRETURN_ERROR (H5E_DIRECTORY, H5E_NOTFOUND, -2);
}
-
- /* component not found */
- if (dir_ent) *dir_ent = *dir;
- HRETURN_ERROR (H5E_DIRECTORY, H5E_NOTFOUND, -2);
}
/* next component */
@@ -637,7 +639,9 @@ H5G_insert (hdf5_file_t *f, H5G_entry_t *cwd, H5G_entry_t *dir_ent,
if (f->root_sym->header<=0) {
H5O_name_t name_mesg;
name_mesg.s = rest;
- if (H5O_modify (f, ent->header, ent, NULL, H5O_NAME, 0, &name_mesg)<0) {
+ if (H5O_modify (f, ent->header, ent, NULL, H5O_NAME, 0, &name_mesg)<0 &&
+ H5O_modify (f, ent->header, ent, NULL, H5O_NAME, H5O_NEW_MESG,
+ &name_mesg)<0) {
/* cannot add/change name message */
HRETURN_ERROR (H5E_DIRECTORY, H5E_CANTINIT, FAIL);
}