am bd4c482b: Merge "Clean up AssetManager::scanAndMergeZipLocked"

* commit 'bd4c482be9c060d92919080c37e0d14fca94d2aa':
  Clean up AssetManager::scanAndMergeZipLocked
This commit is contained in:
Yusuke Sato
2015-08-05 23:38:47 +00:00
committed by Android Git Automerger

View File

@@ -1545,7 +1545,7 @@ bool AssetManager::scanAndMergeZipLocked(SortedVector<AssetDir::FileInfo>* pMerg
*/
int dirNameLen = dirName.length();
void *iterationCookie;
if (!pZip->startIteration(&iterationCookie)) {
if (!pZip->startIteration(&iterationCookie, dirName.string(), NULL)) {
ALOGW("ZipFileRO::startIteration returned false");
return false;
}
@@ -1560,9 +1560,7 @@ bool AssetManager::scanAndMergeZipLocked(SortedVector<AssetDir::FileInfo>* pMerg
continue;
}
//printf("Comparing %s in %s?\n", nameBuf, dirName.string());
if (dirNameLen == 0 ||
(strncmp(nameBuf, dirName.string(), dirNameLen) == 0 &&
nameBuf[dirNameLen] == '/'))
if (dirNameLen == 0 || nameBuf[dirNameLen] == '/')
{
const char* cp;
const char* nextSlash;