Merge pull request #9915 from AknEp/v3

FileUtils::fullPathForFilename should return "" if resource is not found.
This commit is contained in:
Huabing.Xu 2015-01-12 20:01:56 +08:00
commit ae5530c29a
1 changed files with 2 additions and 3 deletions

View File

@ -779,9 +779,8 @@ std::string FileUtils::fullPathForFilename(const std::string &filename)
CCLOG("cocos2d: fullPathForFilename: No file found at %s. Possible missing file.", filename.c_str());
}
// FIXME: Should it return nullptr ? or an empty string ?
// The file wasn't found, return the file name passed in.
return filename;
// The file wasn't found, return empty string.
return "";
}
std::string FileUtils::fullPathFromRelativeFile(const std::string &filename, const std::string &relativeFile)