Skip to content

Commit

Permalink
[fuchsia] Add diagnostics directory to the remote dirs and ensure ent…
Browse files Browse the repository at this point in the history
…ry 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.
  • Loading branch information
miguelfrde authored and gaaclarke committed Jan 10, 2020
1 parent f4c7fcd commit b98e299
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions shell/platform/fuchsia/flutter/component.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,21 @@ Application::Application(
<< "): " << zx_status_get_string(status);
return;
}
const char* other_dirs[] = {"debug", "ctrl"};
const char* other_dirs[] = {"debug", "ctrl", "diagnostics"};
// add other directories as RemoteDirs.
for (auto& dir_str : other_dirs) {
fidl::InterfaceHandle<fuchsia::io::Directory> dir;
auto request = dir.NewRequest().TakeChannel();
fdio_service_connect_at(directory_ptr_.channel().get(), dir_str,
request.release());
outgoing_dir_->AddEntry(
dir_str, std::make_unique<vfs::RemoteDir>(dir.TakeChannel()));
auto status = fdio_service_connect_at(directory_ptr_.channel().get(),
dir_str, request.release());
if (status == ZX_OK) {
outgoing_dir_->AddEntry(
dir_str, std::make_unique<vfs::RemoteDir>(dir.TakeChannel()));
} else {
FML_LOG(ERROR) << "could not add out directory entry(" << dir_str
<< ") for flutter app(" << debug_label_
<< "): " << zx_status_get_string(status);
}
}
};

Expand Down

0 comments on commit b98e299

Please sign in to comment.