hello. sorry for my poor english. but i have a problem. plz help me.
i try to run my project on iOS. but it’s fail to open resource file.
The main culprit in the current problem seems to be CCFileUtils::fullParhFromRelativePath function on CCFileUtilsmm file.
This function not return an accurate path.
if input parameter contains no sub directory, then variable “fullpath” set well.
But curiously enough, if it contains sub directory then variable “fullpath” set nil.
like this:
I have no idea why this happen. plz give me a little bit of clue.
thanks for reply.
yeh. From a common-sense point of view, function “fullPathFromRelativePath” return full path you said.
but like the preceding, that function return NOT full path( just relative path) when relative path contains sub drectory.
The funny thing is that function called by cocos2d method.
CCTexture2D * CCTextureCache::addImage(const char * path)
{
CCAssert(path != NULL, "TextureCache: fileimage MUST not be NULL");
CCTexture2D * texture = NULL;
// Split up directory and filename
// MUTEX:
// Needed since addImageAsync calls this method from a different thread
//pthread_mutex_lock(m_pDictLock);
// remove possible -HD suffix to prevent caching the same image twice (issue #1040)
std::string pathKey = path;
pathKey = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath(pathKey.c_str());
the result depends on whether parameter “path” contains directory or not. I can’t understand this situation.
oh shit ….
fullParhFromRelativePath function has been removed in 2.1rc0-x-2.1.2 ….
shitttttttttttttttttttt
What have i done! ahhhhhhhhhhsdfl ashkdklfjhwlek fhlskdjf klsdjb fklajdbfklasjd;lfjk l;asdjfocausdro;cfaunouvcnucr;weuxrm;weuemrl;xasndzblkcnlzxmsltcmfnlhvtgnzpouc;tioybhl