[DEBUG] remove multiple instance in search sub folder in apk

This commit is contained in:
Edouard DUPIN 2014-01-04 17:13:33 +01:00
parent a463e9c4de
commit b5883ad936

View File

@ -1214,6 +1214,7 @@ std::vector<etk::FSNode *> etk::FSNode::folderGetSubList(bool _showHidenFile, bo
#ifdef __TARGET_OS__Android
if( m_type == etk::FSN_TYPE_DATA
|| m_type == etk::FSN_TYPE_THEME_DATA) {
std::vector<std::string> listAdded;
std::string assetsName = "assets/";
std::string FolderName = getNameFolder();
if (s_APKArchive==NULL) {
@ -1230,6 +1231,15 @@ std::vector<etk::FSNode *> etk::FSNode::folderGetSubList(bool _showHidenFile, bo
tmpString = std::string(tmpString, 0, pos+1);
}
tmpString = getName() + tmpString;
bool findIt = false;
for (size_t jjj = 0; jjj < listAdded.size(); ++jjj) {
if (listAdded[jjj] == tmpString) {
findIt = true;
break;
}
}
if (findIt == false) {
listAdded.push_back(tmpString);
tmpEmement = new etk::FSNode(tmpString);
if (NULL == tmpEmement) {
TK_ERROR("allocation error ... of ewol::FSNode");
@ -1240,6 +1250,7 @@ std::vector<etk::FSNode *> etk::FSNode::folderGetSubList(bool _showHidenFile, bo
tmpEmement = NULL;
}
}
}
return tmpp;
}
#endif