Index: uspace/lib/libfs/libfs.c
===================================================================
--- uspace/lib/libfs/libfs.c	(revision 92f9baca6b223ece5f5e93de7ce2ee6f28a6410d)
+++ uspace/lib/libfs/libfs.c	(revision 10ef329a86471ef42e84a0db45f6e6b1b10d45bd)
@@ -159,5 +159,5 @@
 		/* collect the component */
 		len = 0;
-		while ((ops->plb_get_char(next) != '/') && (next <= last)) {
+		while ((next <= last) &&  (ops->plb_get_char(next) != '/')) {
 			if (len + 1 == NAME_MAX) {
 				/* comopnent length overflow */
