mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 06:58:22 +00:00
vfs: break traversal at separator only filename
This commit is contained in:
@@ -327,6 +327,10 @@ int vfs_resolvepath(vnode_t** result, dirnode_t** resultparent, dirnode_t* ref,
|
|||||||
while(path[nameoffset] && path[nameoffset] != '/')
|
while(path[nameoffset] && path[nameoffset] != '/')
|
||||||
name[offset++] = path[nameoffset++];
|
name[offset++] = path[nameoffset++];
|
||||||
|
|
||||||
|
// if there are only separators in the filename
|
||||||
|
|
||||||
|
if(!offset) break;
|
||||||
|
|
||||||
while(path[nameoffset] == '/')
|
while(path[nameoffset] == '/')
|
||||||
++nameoffset;
|
++nameoffset;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user