mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
test-js: Use Core::File::is_directory(path) instead of opening file
This commit is contained in:
parent
695ba071a8
commit
651829c1e6
1 changed files with 1 additions and 4 deletions
|
@ -160,10 +160,7 @@ void iterate_directory_recursively(const String& directory_path, Callback callba
|
|||
|
||||
while (directory_iterator.has_next()) {
|
||||
auto file_path = String::format("%s/%s", directory_path.characters(), directory_iterator.next_path().characters());
|
||||
auto file = Core::File::open(file_path, Core::IODevice::OpenMode::NotOpen);
|
||||
ASSERT(!file.is_error());
|
||||
|
||||
if (file.value()->is_directory()) {
|
||||
if (Core::File::is_directory(file_path)) {
|
||||
iterate_directory_recursively(file_path, callback);
|
||||
} else {
|
||||
callback(move(file_path));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue