A bug of CCSpriteFrameCache

A bug of CCSpriteFrameCache
0.0 0


When I use CCSpriteFrameCache::addSpriteFramesWithFile to load *.plist file, the path name is convert to full path by CCFileUtils::fullPathFromRelativePath. And in CCSpriteFrameCache::addSpriteFramesWithFile there is a CCTextureCache::sharedTextureCache()->addImage function, in addImage function there is another CCFileUtils::fullPathFromRelativePath function. So the path name is convert to full path name twice.
I have read the code of CCFileUtils::fullPathFromRelativePath. There is no problem if the resource path start with “x:”, for example “d:”. But when the resource path is like “…/resource” and be invoked by CCFileUtils::fullPathFromRelativePath twice, it will become “…/resource…/resource”. It cause that the program can not load the resource.


Nobody do me a favor? Or don’t understand what I said?


May be related to http://www.cocos2d-x.org/boards/10/topics/4292


It’s not related problem!