[DEV] correct file does not exist

This commit is contained in:
Edouard DUPIN 2013-10-10 21:02:25 +02:00
parent 15f270da8a
commit 21c190edee
3 changed files with 29 additions and 24 deletions

View File

@ -15,8 +15,7 @@
#include <cxxabi.h> #include <cxxabi.h>
#include <dlfcn.h> #include <dlfcn.h>
#define MAX_DEPTH (256) #define MAX_DEPTH (256)
void etk::displayBacktrace(void) void etk::displayBacktrace(bool _breakAtEnd) {
{
// retrieve call-stack // retrieve call-stack
void * trace[MAX_DEPTH]; void * trace[MAX_DEPTH];
int stack_depth = backtrace(trace, MAX_DEPTH); int stack_depth = backtrace(trace, MAX_DEPTH);
@ -39,11 +38,12 @@
free(demangled); free(demangled);
} }
} }
if (_breakAtEnd == true) {
assert(false); assert(false);
} }
}
#else #else
void etk::displayBacktrace(void) void etk::displayBacktrace(bool _breakAtEnd) {
{
#if DEBUG_LEVEL > 2 #if DEBUG_LEVEL > 2
assert(false); assert(false);
#endif #endif

View File

@ -69,7 +69,7 @@ namespace etk
*/ */
etk::CCout& operator <<(etk::CCout &_os, const etk::logLevel_te _obj); etk::CCout& operator <<(etk::CCout &_os, const etk::logLevel_te _obj);
void displayBacktrace(void); void displayBacktrace(bool _breakAtEnd=true);
}; };
//regular colors //regular colors

View File

@ -360,6 +360,9 @@ bool etk::FSNode::loadDataZip(void)
if (NULL != m_zipContent) { if (NULL != m_zipContent) {
return true; return true;
} }
if (false == s_APKArchive->exist(m_systemFileName)) {
return false;
}
m_zipContent = &s_APKArchive->getContent(m_systemFileName); m_zipContent = &s_APKArchive->getContent(m_systemFileName);
if (NULL != m_zipContent) { if (NULL != m_zipContent) {
return true; return true;
@ -443,8 +446,7 @@ etk::FSNode::FSNode(const etk::UString& _nodeName) :
} }
etk::FSNode::~FSNode(void) etk::FSNode::~FSNode(void) {
{
if( NULL != m_PointerFile if( NULL != m_PointerFile
#ifdef __TARGET_OS__Android #ifdef __TARGET_OS__Android
|| NULL != m_zipContent || NULL != m_zipContent
@ -456,8 +458,7 @@ etk::FSNode::~FSNode(void)
} }
void etk::FSNode::sortElementList(etk::Vector<etk::FSNode *>& _list) void etk::FSNode::sortElementList(etk::Vector<etk::FSNode *>& _list) {
{
etk::Vector<etk::FSNode *> tmpList = _list; etk::Vector<etk::FSNode *> tmpList = _list;
_list.clear(); _list.clear();
for(int32_t iii=0; iii<tmpList.size(); iii++) { for(int32_t iii=0; iii<tmpList.size(); iii++) {
@ -756,7 +757,11 @@ void etk::FSNode::updateFileSystemProperty(void)
folderName = m_systemFileName + "/"; folderName = m_systemFileName + "/";
} }
// note : Zip does not support other think than file ... // note : Zip does not support other think than file ...
if ( s_APKArchive != NULL
&& s_APKArchive->exist(m_systemFileName) == true) {
m_typeNode=FSN_FILE; m_typeNode=FSN_FILE;
}
m_rights.setUserReadable(true); m_rights.setUserReadable(true);
// TODO : Set the time of the file (time program compilation) // TODO : Set the time of the file (time program compilation)
// TODO : Set the USER ID in the group and the user Id ... // TODO : Set the USER ID in the group and the user Id ...
@ -1233,7 +1238,7 @@ void etk::FSNode::folderGetRecursiveFiles(etk::Vector<etk::UString>& _output, bo
tmpString = "THEME:"; tmpString = "THEME:";
} }
if (true == filename.startWith(assetsName)) { if (true == filename.startWith(assetsName)) {
filename.remove(0,assetsName.Size()); filename.remove(0,assetsName.size());
} }
tmpString += filename; tmpString += filename;
_output.pushBack(tmpString); _output.pushBack(tmpString);