Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit b98e299

Browse files
miguelfrdegaaclarke
authored andcommitted
[fuchsia] Add diagnostics directory to the remote dirs and ensure entry exists (#15258)
This reverts commit 4312d37. Once https://fuchsia-review.googlesource.com/c/topaz/+/351729 lands, the diagnostics directory will be present, this would be safe to do and the roller won't be blocked again.
1 parent f4c7fcd commit b98e299

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

shell/platform/fuchsia/flutter/component.cc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,21 @@ Application::Application(
231231
<< "): " << zx_status_get_string(status);
232232
return;
233233
}
234-
const char* other_dirs[] = {"debug", "ctrl"};
234+
const char* other_dirs[] = {"debug", "ctrl", "diagnostics"};
235235
// add other directories as RemoteDirs.
236236
for (auto& dir_str : other_dirs) {
237237
fidl::InterfaceHandle<fuchsia::io::Directory> dir;
238238
auto request = dir.NewRequest().TakeChannel();
239-
fdio_service_connect_at(directory_ptr_.channel().get(), dir_str,
240-
request.release());
241-
outgoing_dir_->AddEntry(
242-
dir_str, std::make_unique<vfs::RemoteDir>(dir.TakeChannel()));
239+
auto status = fdio_service_connect_at(directory_ptr_.channel().get(),
240+
dir_str, request.release());
241+
if (status == ZX_OK) {
242+
outgoing_dir_->AddEntry(
243+
dir_str, std::make_unique<vfs::RemoteDir>(dir.TakeChannel()));
244+
} else {
245+
FML_LOG(ERROR) << "could not add out directory entry(" << dir_str
246+
<< ") for flutter app(" << debug_label_
247+
<< "): " << zx_status_get_string(status);
248+
}
243249
}
244250
};
245251

0 commit comments

Comments
 (0)