[DEBUG] remove multiple instance in search sub folder in apk
This commit is contained in:
parent
a463e9c4de
commit
b5883ad936
@ -1214,6 +1214,7 @@ std::vector<etk::FSNode *> etk::FSNode::folderGetSubList(bool _showHidenFile, bo
|
|||||||
#ifdef __TARGET_OS__Android
|
#ifdef __TARGET_OS__Android
|
||||||
if( m_type == etk::FSN_TYPE_DATA
|
if( m_type == etk::FSN_TYPE_DATA
|
||||||
|| m_type == etk::FSN_TYPE_THEME_DATA) {
|
|| m_type == etk::FSN_TYPE_THEME_DATA) {
|
||||||
|
std::vector<std::string> listAdded;
|
||||||
std::string assetsName = "assets/";
|
std::string assetsName = "assets/";
|
||||||
std::string FolderName = getNameFolder();
|
std::string FolderName = getNameFolder();
|
||||||
if (s_APKArchive==NULL) {
|
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 = std::string(tmpString, 0, pos+1);
|
||||||
}
|
}
|
||||||
tmpString = getName() + tmpString;
|
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);
|
tmpEmement = new etk::FSNode(tmpString);
|
||||||
if (NULL == tmpEmement) {
|
if (NULL == tmpEmement) {
|
||||||
TK_ERROR("allocation error ... of ewol::FSNode");
|
TK_ERROR("allocation error ... of ewol::FSNode");
|
||||||
@ -1240,6 +1250,7 @@ std::vector<etk::FSNode *> etk::FSNode::folderGetSubList(bool _showHidenFile, bo
|
|||||||
tmpEmement = NULL;
|
tmpEmement = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return tmpp;
|
return tmpp;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user