Issue #9061: Fix issue about compare logic

This commit is contained in:
pandamicro 2014-11-10 19:23:41 +08:00
parent 8652864242
commit 68e5132107
1 changed files with 3 additions and 1 deletions

View File

@ -158,9 +158,11 @@ void AssetsManagerEx::loadLocalManifest(const std::string& manifestUrl)
{
// Compare with cached manifest to determine which one to use
if (cachedManifest) {
if (strcmp(_localManifest->getVersion().c_str(), cachedManifest->getVersion().c_str()))
if (strcmp(_localManifest->getVersion().c_str(), cachedManifest->getVersion().c_str()) > 0)
{
// Recreate storage, to empty the content
_fileUtils->removeDirectory(_storagePath);
_fileUtils->createDirectory(_storagePath);
CC_SAFE_RELEASE(cachedManifest);
}
else