Move off the Next ZipString overload.

Bug: http://b/129068177
Test: treehugger
Change-Id: I3c8f70b0d8cc5dc6b3b4439dbe0b9a5bd85003c4
This commit is contained in:
Elliott Hughes
2019-05-22 18:52:29 -07:00
parent d31fb2e7fc
commit 88d8001e75
3 changed files with 7 additions and 9 deletions
+2 -2
View File
@@ -539,13 +539,13 @@ bool verify_package_compatibility(ZipArchiveHandle package_zip) {
std::vector<std::string> compatibility_info;
ZipEntry info_entry;
ZipString info_name;
std::string info_name;
while (Next(cookie, &info_entry, &info_name) == 0) {
std::string content(info_entry.uncompressed_length, '\0');
int32_t ret = ExtractToMemory(zip_handle, &info_entry, reinterpret_cast<uint8_t*>(&content[0]),
info_entry.uncompressed_length);
if (ret != 0) {
LOG(ERROR) << "Failed to read " << info_name.name << ": " << ErrorCodeString(ret);
LOG(ERROR) << "Failed to read " << info_name << ": " << ErrorCodeString(ret);
CloseArchive(zip_handle);
return false;
}