- /* errno is set to ENOTDIR if the lookup failed due to reaching a
- * non-directory, or ENOENT if the lookup failed otherwise. This maybe
- * should be factored out somehow. */
- if (dentry_is_directory(cur_dentry))
- errno = ENOENT;
- else
- errno = ENOTDIR;
- return NULL;
-}
-
-/* Returns the dentry corresponding to the UTF-8 @path, or NULL if there is no
- * such dentry. */
-struct wim_dentry *get_dentry(WIMStruct *w, const char *path)
-{
- struct wim_dentry *root = wim_root_dentry(w);
- while (*path == '/')
- path++;
- return get_dentry_relative_path(root, path);