Index: uspace/app/cmpdirs/cmpdirs.c
===================================================================
--- uspace/app/cmpdirs/cmpdirs.c	(revision 7952b336d724f083cb8d6f8405136a1518af19f3)
+++ uspace/app/cmpdirs/cmpdirs.c	(revision b0178856327e4f27aa16082db4022897e58d8f86)
@@ -334,5 +334,5 @@
 				assert(rc != EOK);
 			}
-			check_ok(rc, close_inner, "Failed to open directory (handle %d", item.handle1);
+			check_ok(rc, close_inner, "Failed to open directory of handle %d", item.handle1);
 
 			while ((dp = readdir(dirp))) { // 1.
@@ -345,11 +345,16 @@
 				}
 				check_ok_break(rc, "Name too long (limit is %"PRIdn" excluding null-terminator)", name_buffer_size);
+				// add slash to the beginning of the name, because vfs_walk requires the path to be absolute (will be
+				// resolved relatively to the starting directory)
+				char name_with_slash[name_buffer_size+1];
+				name_with_slash[0] = '/';
+				str_cpy(name_with_slash + 1, name_size + 1, dp->d_name);
 				// 2.
 				int entry_handle1; // don't forget to put
-				rc = vfs_walk(item.handle1, dp->d_name, 0, &entry_handle1);
-				check_ok_break(rc, "(0) Failed to find entry \"%s\" in directory of handle %d\n", dp->d_name, item.handle1);
+				rc = vfs_walk(item.handle1, name_with_slash, 0, &entry_handle1);
+				check_ok_break(rc, "(0) Failed to find entry \"%s\" in directory of handle %d\n", name_with_slash, item.handle1);
 				// 3.
 				int entry_handle2; // must be put
-				rc= vfs_walk(item.handle2, dp->d_name, 0, &entry_handle2);
+				rc= vfs_walk(item.handle2, name_with_slash, 0, &entry_handle2);
 				if (rc != EOK) {
 					errno_t rc2 = vfs_put(entry_handle1);
@@ -360,5 +365,5 @@
 						break;
 					}
-					check_ok_break(rc, "(1) Failed to find entry \"%s\" in directory of handle %d\n", dp->d_name, item.handle2);
+					check_ok_break(rc, "(1) Failed to find entry \"%s\" in directory of handle %d\n", name_with_slash, item.handle2);
 				}
 
