Skip to content

Commit bb91b73

Browse files
committed
CLOUDSTACK-5541: Template Creation from snapshot failed with S3 store.
1 parent 231e7c0 commit bb91b73

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,11 +497,9 @@ protected Answer copySnapshot(DataObject srcData, DataObject destData) {
497497
answer = ep.sendMessage(cmd);
498498
}
499499
}
500-
// clean up cache entry in case of failure
501-
if (answer == null || !answer.getResult()) {
502-
if (cacheData != null) {
503-
cacheMgr.deleteCacheObject(cacheData);
504-
}
500+
// clean up cache entry
501+
if (cacheData != null) {
502+
cacheMgr.deleteCacheObject(cacheData);
505503
}
506504
return answer;
507505
} catch (Exception e) {

0 commit comments

Comments
 (0)