mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48: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] != '/')
|
||||
name[offset++] = path[nameoffset++];
|
||||
|
||||
// if there are only separators in the filename
|
||||
|
||||
if(!offset) break;
|
||||
|
||||
while(path[nameoffset] == '/')
|
||||
++nameoffset;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user