From 68e51321075ba99a9efe4d6393000f92c68c9580 Mon Sep 17 00:00:00 2001 From: pandamicro Date: Mon, 10 Nov 2014 19:23:41 +0800 Subject: [PATCH] Issue #9061: Fix issue about compare logic --- extensions/assets-manager/AssetsManagerEx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/assets-manager/AssetsManagerEx.cpp b/extensions/assets-manager/AssetsManagerEx.cpp index 806827f20c..834360f7ab 100644 --- a/extensions/assets-manager/AssetsManagerEx.cpp +++ b/extensions/assets-manager/AssetsManagerEx.cpp @@ -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