Reduce logspam in DirectoryAssetBundle (flutter/engine#4690)

It's not an error to request an asset that doesn't exist. In fact, we
request kernel_blob.bin unconditionally at startup, which doesn't
typically exist.
This commit is contained in:
Adam Barth 2018-02-19 08:38:45 -08:00 committed by GitHub
parent 5de8c90177
commit db4e089e22

View File

@ -25,10 +25,8 @@ bool DirectoryAssetBundle::GetAsBuffer(const std::string& asset_name,
return false;
#else
fxl::UniqueFD asset_file(openat(fd_.get(), asset_name.c_str(), O_RDONLY));
if (!asset_file.is_valid()) {
FXL_LOG(ERROR) << "Could not load asset " << asset_name;
if (!asset_file.is_valid())
return false;
}
constexpr size_t kBufferSize = 1 << 16;
size_t offset = 0;