From c92c12d71ae1ef4eb25e7d81011a4544b8b234a0 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 9 May 2013 01:39:54 +0200 Subject: [PATCH] libroot_build: Fix incorrect skipDot check in find_dir_entry() Would result in the _kern_open_parent_dir() failing for "/" and maybe in other cases as well. --- src/build/libroot/fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/libroot/fs.cpp b/src/build/libroot/fs.cpp index fd62acfc6e..c298454647 100644 --- a/src/build/libroot/fs.cpp +++ b/src/build/libroot/fs.cpp @@ -207,7 +207,7 @@ find_dir_entry(DIR *dir, const char *path, NodeRef ref, string &name, // find the entry bool found = false; while (dirent *entry = readdir(dir)) { - if ((!skipDot && strcmp(entry->d_name, ".") == 0) + if ((strcmp(entry->d_name, ".") == 0 && skipDot) || strcmp(entry->d_name, "..") == 0) { // skip "." and ".." } else /*if (entry->d_ino == ref.node)*/ {