1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Don't overwrite the distribution if it's already there.

This commit is contained in:
Cedric Beust 2016-02-18 21:42:17 +04:00
parent ba3dd38e90
commit 170cdfce75

View file

@ -138,14 +138,16 @@ public class Main {
String zipOutputDir = DISTRIBUTIONS_DIR + "/" + wrapperVersion;
Path kobaltJarFile = Paths.get(zipOutputDir,
getWrapperDir().getPath() + "/" + FILE_NAME + "-" + wrapperVersion + ".jar");
boolean downloadedZipFile = false;
if (! Files.exists(localZipFile) || ! Files.exists(kobaltJarFile)) {
download(localZipFile.toFile(), wrapperVersion);
downloadedZipFile = true;
}
//
// Extract all the zip files
//
if (! noOverwrite) {
if (! noOverwrite && downloadedZipFile) {
int retries = 0;
while (retries < 2) {
try {