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:
@@ -207,7 +207,7 @@ find_dir_entry(DIR *dir, const char *path, NodeRef ref, string &name,
|
|||||||
// find the entry
|
// find the entry
|
||||||
bool found = false;
|
bool found = false;
|
||||||
while (dirent *entry = readdir(dir)) {
|
while (dirent *entry = readdir(dir)) {
|
||||||
if ((!skipDot && strcmp(entry->d_name, ".") == 0)
|
if ((strcmp(entry->d_name, ".") == 0 && skipDot)
|
||||||
|| strcmp(entry->d_name, "..") == 0) {
|
|| strcmp(entry->d_name, "..") == 0) {
|
||||||
// skip "." and ".."
|
// skip "." and ".."
|
||||||
} else /*if (entry->d_ino == ref.node)*/ {
|
} else /*if (entry->d_ino == ref.node)*/ {
|
||||||
|
|||||||
Reference in New Issue
Block a user