Update ziparchive usage to the new API.

Bug: 16162465

Change-Id: If3064e2be3e7e85366b07434294a7879b0e5f9bc
This commit is contained in:
Piotr Jastrzebski
2014-08-13 07:50:20 +01:00
parent 4179e88963
commit e2134a4b5d

View File

@@ -50,8 +50,7 @@ public:
ZipEntryName name;
void *cookie;
_ZipEntryRO() : cookie(NULL) {
}
_ZipEntryRO() : cookie(NULL) {}
~_ZipEntryRO() {
EndIteration(cookie);
@@ -87,15 +86,15 @@ ZipFileRO::~ZipFileRO() {
ZipEntryRO ZipFileRO::findEntryByName(const char* entryName) const
{
_ZipEntryRO* data = new _ZipEntryRO;
const int32_t error = FindEntry(mHandle, entryName, &(data->entry));
data->name = ZipEntryName(entryName);
const int32_t error = FindEntry(mHandle, data->name, &(data->entry));
if (error) {
delete data;
return NULL;
}
data->name.name = entryName;
data->name.name_length = strlen(entryName);
return (ZipEntryRO) data;
}