BDirectory: GetNextEntry() should unset entry when one is not found.

Fixes #1692.
This commit is contained in:
Augustin Cavalier
2018-12-14 18:48:38 -05:00
parent e000ae2c88
commit 26d14a317c
+2
View File
@@ -338,6 +338,8 @@ BDirectory::GetNextEntry(BEntry* entry, bool traverse)
if (error == B_OK)
error = entry->SetTo(&ref, traverse);
}
if (error != B_OK && entry != NULL)
entry->Unset();
return error;
}