Loading src/main/java/ecorp/easy/installer/tasks/DownloadTask.java +4 −4 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ public class DownloadTask extends Task<Boolean>{ //If checksum valid it means that file is already there and up to date updateMessage(i18n.getString("download_lbl_checkingIntegrity")); if ( validChecksum(checksumFilePath) ){ if ( validChecksum(localFilePath, checksumFilePath) ){ updateMessage(i18n.getString("download_lbl_fileAlreadyUptoDate")); return true; } Loading @@ -137,7 +137,7 @@ public class DownloadTask extends Task<Boolean>{ logger.debug("Downloaded succeed. Rename temp file to right fileName"); File tmpFile = new File(tmpFilePath); tmpFile.renameTo(new File(localFilePath)); return validChecksum(checksumFilePath); return validChecksum(localFilePath, checksumFilePath); }else{ updateMessage(i18n.getString("download_lbl_downloadError")); Loading Loading @@ -340,7 +340,7 @@ public class DownloadTask extends Task<Boolean>{ * @throws NoSuchAlgorithmException * @throws IOException */ private boolean validChecksum( String checksumFilePath) throws NoSuchAlgorithmException, IOException{ private boolean validChecksum(String localFilePath, String checksumFilePath) throws NoSuchAlgorithmException, IOException{ logger.debug("validChecksum("+checksumFilePath+")"); //get file containing checksum File checksumFile = new File(checksumFilePath); Loading @@ -356,7 +356,7 @@ public class DownloadTask extends Task<Boolean>{ String[] splittedLine = checksumLine.split("\\s+"); //@todo use pattern & matcher //check local file exist File file = new File(AppConstants.getSourcesFolderPath()+splittedLine[1]); File file = new File(localFilePath); if(!file.exists()){ //if file concerned by checksum doesn't exist we can't validate updateMessage(i18n.getString("download_lbl_localFileNotFound")); //@todo not sure it is required... logger.debug(" "+splittedLine[1]+" do not exists"); Loading Loading
src/main/java/ecorp/easy/installer/tasks/DownloadTask.java +4 −4 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ public class DownloadTask extends Task<Boolean>{ //If checksum valid it means that file is already there and up to date updateMessage(i18n.getString("download_lbl_checkingIntegrity")); if ( validChecksum(checksumFilePath) ){ if ( validChecksum(localFilePath, checksumFilePath) ){ updateMessage(i18n.getString("download_lbl_fileAlreadyUptoDate")); return true; } Loading @@ -137,7 +137,7 @@ public class DownloadTask extends Task<Boolean>{ logger.debug("Downloaded succeed. Rename temp file to right fileName"); File tmpFile = new File(tmpFilePath); tmpFile.renameTo(new File(localFilePath)); return validChecksum(checksumFilePath); return validChecksum(localFilePath, checksumFilePath); }else{ updateMessage(i18n.getString("download_lbl_downloadError")); Loading Loading @@ -340,7 +340,7 @@ public class DownloadTask extends Task<Boolean>{ * @throws NoSuchAlgorithmException * @throws IOException */ private boolean validChecksum( String checksumFilePath) throws NoSuchAlgorithmException, IOException{ private boolean validChecksum(String localFilePath, String checksumFilePath) throws NoSuchAlgorithmException, IOException{ logger.debug("validChecksum("+checksumFilePath+")"); //get file containing checksum File checksumFile = new File(checksumFilePath); Loading @@ -356,7 +356,7 @@ public class DownloadTask extends Task<Boolean>{ String[] splittedLine = checksumLine.split("\\s+"); //@todo use pattern & matcher //check local file exist File file = new File(AppConstants.getSourcesFolderPath()+splittedLine[1]); File file = new File(localFilePath); if(!file.exists()){ //if file concerned by checksum doesn't exist we can't validate updateMessage(i18n.getString("download_lbl_localFileNotFound")); //@todo not sure it is required... logger.debug(" "+splittedLine[1]+" do not exists"); Loading