Merge "Open image files in binary mode" into qt-dev

This commit is contained in:
TreeHugger Robot 2019-04-05 02:42:47 +00:00 committed by Android (Google) Code Review
commit 0294313ad9

View file

@ -1407,7 +1407,7 @@ bool LocalImageSource::ReadFile(const std::string& name, std::vector<char>* out)
int LocalImageSource::OpenFile(const std::string& name) const {
auto path = find_item_given_name(name);
return open(path.c_str(), O_RDONLY);
return open(path.c_str(), O_RDONLY | O_BINARY);
}
static void do_flashall(const std::string& slot_override, bool skip_secondary, bool wipe) {