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