CLOUDSTACK-5541: Template Creation from snapshot failed with S3 store.

This commit is contained in:
Min Chen 2013-12-18 15:41:37 -08:00
parent b7a81f8428
commit 3ce63bef82
1 changed files with 3 additions and 5 deletions

View File

@ -508,11 +508,9 @@ AncientDataMotionStrategy implements DataMotionStrategy {
answer = ep.sendMessage(cmd);
}
}
// clean up cache entry in case of failure
if (answer == null || !answer.getResult()) {
if (cacheData != null) {
cacheMgr.deleteCacheObject(cacheData);
}
// clean up cache entry
if (cacheData != null) {
cacheMgr.deleteCacheObject(cacheData);
}
return answer;
} catch (Exception e) {