File direction error
This commit is contained in:
parent
5f63c38eb8
commit
50ebb501c8
@ -254,8 +254,22 @@ void etk::File::SetCompleateName(etk::String &newFilename, etk::FileType_te type
|
||||
}
|
||||
} else {
|
||||
if (type == etk::FILE_TYPE_DIRECT) {
|
||||
TK_WARNING("Incompatible type with a file=\"" << newFilename << "\" ==> force it in FILE_TYPE_DATA mode ...");
|
||||
m_type = etk::FILE_TYPE_DATA;
|
||||
//TK_WARNING("Incompatible type with a file=\"" << newFilename << "\" ==> force it in FILE_TYPE_DATA mode ...");
|
||||
//m_type = etk::FILE_TYPE_DATA;
|
||||
m_type = etk::FILE_TYPE_DIRECT;
|
||||
// add current path :
|
||||
// Get the command came from the running of the program :
|
||||
char cCurrentPath[FILENAME_MAX];
|
||||
if (!getcwd(cCurrentPath, FILENAME_MAX)) {
|
||||
return;
|
||||
}
|
||||
cCurrentPath[FILENAME_MAX - 1] = '\0';
|
||||
etk::String tmpFilename = destFilename;
|
||||
destFilename = cCurrentPath;
|
||||
destFilename += '/';
|
||||
destFilename += tmpFilename;
|
||||
|
||||
|
||||
} else {
|
||||
m_type = type;
|
||||
}
|
||||
|
@ -496,7 +496,7 @@ int32_t ewol::LoadFont(etk::String fontName, int32_t size)
|
||||
{
|
||||
// check if folder file
|
||||
etk::String tmpFileName = s_currentFolderName + "/" + fontName + ".ttf";
|
||||
etk::File fileName(tmpFileName);
|
||||
etk::File fileName(tmpFileName, etk::FILE_TYPE_DATA);
|
||||
if (false == fileName.Exist()) {
|
||||
EWOL_ERROR("Font does not exist: \"" << fileName.GetCompleateName() << "\"");
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user