mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
vfs: on vfs_lookup, return ENOENT if pathlen is 0 and we are looking for the parent
This commit is contained in:
+4
-1
@@ -230,7 +230,10 @@ int vfs_lookup(vnode_t **result, vnode_t *start, char *path, char *lastcomp, int
|
||||
size_t pathlen = strlen(path);
|
||||
|
||||
if (pathlen == 0) {
|
||||
__assert((flags & VFS_LOOKUP_PARENT) == 0);
|
||||
if (flags & VFS_LOOKUP_PARENT) {
|
||||
return ENOENT;
|
||||
}
|
||||
|
||||
vnode_t *r = start;
|
||||
int e = highestnodeinmp(start, &r);
|
||||
if (e)
|
||||
|
||||
Reference in New Issue
Block a user