diff --git a/cocos2dx/platform/CCFileUtilsCommon_cpp.h b/cocos2dx/platform/CCFileUtilsCommon_cpp.h index 8accc6aa90..83a6a2d142 100644 --- a/cocos2dx/platform/CCFileUtilsCommon_cpp.h +++ b/cocos2dx/platform/CCFileUtilsCommon_cpp.h @@ -382,6 +382,7 @@ std::string CCFileUtils::getNewFilename(const char* pszFileName) } else { pszNewFileName = fileNameFound->getCString(); + CCLOG("FOUND NEW FILE NAME: %s.", pszNewFileName); } return pszNewFileName; } @@ -437,7 +438,7 @@ void CCFileUtils::loadFilenameLookupDictionaryFromFile(const char* filename) CCLOG("cocos2d: ERROR: Invalid filenameLookup dictionary version: %ld. Filename: %s", (long)version, filename); return; } - + CCLOG("Found file lookup plist."); setFilenameLookupDictionary((CCDictionary*)pDict->objectForKey("filenames")); } } diff --git a/cocos2dx/platform/android/CCFileUtils.cpp b/cocos2dx/platform/android/CCFileUtils.cpp index f69926d769..a829e6cec6 100644 --- a/cocos2dx/platform/android/CCFileUtils.cpp +++ b/cocos2dx/platform/android/CCFileUtils.cpp @@ -117,8 +117,8 @@ std::string CCFileUtils::fullPathForFilename(const char* pszFileName) { CCString* pResourceDirectory = (CCString*)pResourceDirObj; - CCLOG("\n\nSEARCHING: %s, %s, %s", pszFileName, pResourceDirectory->getCString(), pSearchPath->getCString()); - fullpath = this->getPathForFilename(pszFileName, pResourceDirectory->getCString(), pSearchPath->getCString()); + CCLOG("\n\nSEARCHING: %s, %s, %s", newFilename.c_str(), pResourceDirectory->getCString(), pSearchPath->getCString()); + fullpath = this->getPathForFilename(newFilename, pResourceDirectory->getCString(), pSearchPath->getCString()); // Check whether file exists in apk. if (s_pZipFile->fileExists(fullpath)) @@ -136,14 +136,14 @@ std::string CCFileUtils::fullPathForFilename(const char* pszFileName) } if (bFound) { - s_fullPathCache.insert(std::pair(pszFileName, fullpath)); + s_fullPathCache.insert(std::pair(newFilename, fullpath)); CCLOG("Returning path: %s", fullpath.c_str()); return fullpath; } } } - return pszFileName; + return newFilename; } const char* CCFileUtils::fullPathFromRelativeFile(const char *pszFilename, const char *pszRelativeFile) diff --git a/samples/Javascript/Shared b/samples/Javascript/Shared index d6d3008895..781803f41e 160000 --- a/samples/Javascript/Shared +++ b/samples/Javascript/Shared @@ -1 +1 @@ -Subproject commit d6d3008895018fa22b4ea73974bcd9e499b8b1fb +Subproject commit 781803f41e2b68a25cd7ad993c9cd70da8b9c05e