Fix typo and add logs

This commit is contained in:
folecr 2012-08-28 16:43:21 -07:00
parent 9fa24f07f5
commit 6c604f02d3
1 changed files with 7 additions and 2 deletions

View File

@ -320,12 +320,14 @@ static size_t readFileInMemory(const char *path, unsigned char **buff) {
JSBool ScriptingCore::runScript(const char *path)
{
CCLOG("ScriptingCore::runScript(%s)", path);
cocos2d::CCFileUtils *futil = cocos2d::CCFileUtils::sharedFileUtils();
const char *realPath = NULL;
futil->fullPathFromRelativePath(path);
const char *realPath = futil->fullPathFromRelativePath(path);
if (!realPath) {
CCLOG("!realPath. returning JS_FALSE");
return JS_FALSE;
}
@ -339,7 +341,10 @@ JSBool ScriptingCore::runScript(const char *path)
if (content && contentSize) {
jsval rval;
ret = this->evalString((const char *)content, &rval, path);
} else {
CCLOG("!(content && contentSize)");
}
return ret;
}