Index: uspace/lib/libfs/libfs.c
===================================================================
--- uspace/lib/libfs/libfs.c	(revision 74ea3c63c02b58dba8c9fea17974b3da66f74190)
+++ uspace/lib/libfs/libfs.c	(revision 9ad75d53c71123a0763106d4d037755479b19fb0)
@@ -149,5 +149,4 @@
 	void *par = NULL;
 	void *cur = ops->root_get(dev_handle);
-	void *tmp;
 
 	if (ops->plb_get_char(next) == '/')
@@ -157,7 +156,8 @@
 	int len = 0;
 	while (ops->has_children(cur) && next <= last) {
+		void *tmp;
 
 		/* collect the component */
-		if (ops->plb_get_char(next) != '/') {
+		while ((ops->plb_get_char(next) != '/') && (next <= last)) {
 			if (len + 1 == NAME_MAX) {
 				/* comopnent length overflow */
@@ -167,6 +167,4 @@
 			component[len++] = ops->plb_get_char(next);
 			next++;	/* process next character */
-			if (next <= last) 
-				continue;
 		}
 
