mirror of https://github.com/axmolengine/axmol.git
fixed a bug in CCFileUtils.cpp of blackberry port.
This commit is contained in:
parent
5e5b71a396
commit
e011be88d8
|
@ -62,6 +62,7 @@ static std::string fullPathFromRelativePathThreadSafe(const char* pszRelativePat
|
||||||
CCAssert(pszRootPath != NULL, "The resource root path must be set in the main.cpp");
|
CCAssert(pszRootPath != NULL, "The resource root path must be set in the main.cpp");
|
||||||
|
|
||||||
std::string pstrRelativePath = pszRelativePath;
|
std::string pstrRelativePath = pszRelativePath;
|
||||||
|
// if the relative path contains root path, skip it.
|
||||||
if (pstrRelativePath.find(pszRootPath) == std::string::npos)
|
if (pstrRelativePath.find(pszRootPath) == std::string::npos)
|
||||||
{
|
{
|
||||||
ret += pszRootPath;
|
ret += pszRootPath;
|
||||||
|
@ -71,7 +72,13 @@ static std::string fullPathFromRelativePathThreadSafe(const char* pszRelativePat
|
||||||
|
|
||||||
if (resDir != NULL)
|
if (resDir != NULL)
|
||||||
{
|
{
|
||||||
ret += resDir;
|
std::string pstrRootPath = pszRootPath;
|
||||||
|
std::string pstrResourceFullPath = pstrRootPath + resDir;
|
||||||
|
// if the relative path contains root path and resource directory, skip it.
|
||||||
|
if (pstrRelativePath.find(pstrResourceFullPath.c_str()) == std::string::npos)
|
||||||
|
{
|
||||||
|
ret += resDir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pszRelativePath != NULL)
|
if (pszRelativePath != NULL)
|
||||||
|
|
Loading…
Reference in New Issue