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.
This commit is contained in:
Ingo Weinhold
2013-05-09 01:48:36 +02:00
parent 865ab2816d
commit c92c12d71a
+1 -1
View File
@@ -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)*/ {