You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/07/08 06:38:35 UTC

[GitHub] [cloudstack] Spaceman1984 commented on a change in pull request #4138: Fixed incorrect error message on invalid template type download

Spaceman1984 commented on a change in pull request #4138:
URL: https://github.com/apache/cloudstack/pull/4138#discussion_r451315166



##########
File path: core/src/main/java/com/cloud/storage/template/HttpTemplateDownloader.java
##########
@@ -243,7 +247,6 @@ private boolean copyBytes(File file, InputStream in, RandomAccessFile out) throw
                 offset = writeBlock(bytes, out, block, offset);
                 if (!verifyFormat.isVerifiedFormat() && (offset >= 1048576 || offset >= remoteSize)) { //let's check format after we get 1MB or full file
                     verifyFormat.invoke();
-                    if (verifyFormat.isInvalid()) return true;

Review comment:
       @rhtyd If validation fails, an exception is thrown, so there is no setting of an invalid state that has to be checked.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org