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 231e7c01f2
commit bb91b739a8

View File

@ -497,11 +497,9 @@ public class 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) {