[DEBUG] correct the Path searching error on Android
This commit is contained in:
parent
3924f90c4d
commit
87a8e82d7f
@ -1009,6 +1009,9 @@ void etk::FSNode::updateFileSystemProperty() {
|
|||||||
m_rights.setUserRunable(true);
|
m_rights.setUserRunable(true);
|
||||||
TK_DBG_MODE("Find a Folder in APK : '" << m_systemFileName << "'");
|
TK_DBG_MODE("Find a Folder in APK : '" << m_systemFileName << "'");
|
||||||
m_systemFileName += '/';
|
m_systemFileName += '/';
|
||||||
|
if (m_userFileName[m_userFileName.size()-1] != '/') {
|
||||||
|
m_userFileName += '/';
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1464,6 +1467,9 @@ std::vector<etk::FSNode *> etk::FSNode::folderGetSubList(bool _showHidenFile, bo
|
|||||||
if (s_APKArchive==nullptr) {
|
if (s_APKArchive==nullptr) {
|
||||||
return tmpp;
|
return tmpp;
|
||||||
}
|
}
|
||||||
|
if (FolderName[FolderName.size()-1] != '/') {
|
||||||
|
FolderName += "/";
|
||||||
|
}
|
||||||
for (int iii=0; iii<s_APKArchive->size(); iii++) {
|
for (int iii=0; iii<s_APKArchive->size(); iii++) {
|
||||||
std::string filename = s_APKArchive->getName(iii);
|
std::string filename = s_APKArchive->getName(iii);
|
||||||
if (start_with(filename, FolderName) == true) {
|
if (start_with(filename, FolderName) == true) {
|
||||||
@ -1471,7 +1477,7 @@ std::vector<etk::FSNode *> etk::FSNode::folderGetSubList(bool _showHidenFile, bo
|
|||||||
size_t pos = tmpString.find('/');
|
size_t pos = tmpString.find('/');
|
||||||
if (pos != std::string::npos) {
|
if (pos != std::string::npos) {
|
||||||
// a simple folder :
|
// a simple folder :
|
||||||
tmpString = std::string(tmpString, 0, pos+1);
|
tmpString = std::string(tmpString, 0, pos);
|
||||||
}
|
}
|
||||||
tmpString = getName() + tmpString;
|
tmpString = getName() + tmpString;
|
||||||
bool findIt = false;
|
bool findIt = false;
|
||||||
@ -1560,10 +1566,13 @@ std::vector<std::string> etk::FSNode::folderGetSub(bool _getFolder, bool _getFil
|
|||||||
if (s_APKArchive == nullptr) {
|
if (s_APKArchive == nullptr) {
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
for (int iii=0; iii<s_APKArchive->size(); iii++) {
|
if (FolderName[FolderName.size()-1] != '/') {
|
||||||
|
FolderName += "/";
|
||||||
|
}
|
||||||
|
for (size_t iii=0; iii<s_APKArchive->size(); iii++) {
|
||||||
std::string filename = s_APKArchive->getName(iii);
|
std::string filename = s_APKArchive->getName(iii);
|
||||||
if (start_with(filename, FolderName) == true) {
|
if (start_with(filename, FolderName) == true) {
|
||||||
std::string tmpString(filename, FolderName.size()+1);
|
std::string tmpString(filename, FolderName.size());
|
||||||
size_t pos = tmpString.find('/');
|
size_t pos = tmpString.find('/');
|
||||||
if (pos != std::string::npos) {
|
if (pos != std::string::npos) {
|
||||||
// a simple folder :
|
// a simple folder :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user