summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5G.c b/src/H5G.c
index 1cffed5..8096daf 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -263,6 +263,11 @@ H5G_namei (hdf5_file_t *f, H5G_entry_t *cwd, const char *name,
H5O_reset (H5O_NAME, &mesg);
*base = *dir;
aside = TRUE;
+ } else {
+ /* component not found */
+ H5O_reset (H5O_NAME, &mesg);
+ if (dir_ent) *dir_ent = *dir;
+ HRETURN_ERROR (H5E_DIRECTORY, H5E_NOTFOUND, -2);
}
H5O_reset (H5O_NAME, &mesg);
} else {