vfs: break traversal at separator only filename

This commit is contained in:
Matheus
2022-08-29 00:21:56 -03:00
parent 13a6618041
commit cd8b9ae1e6
+4
View File
@@ -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;