mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
gradle: check existing corrupted gradle dist zip before test
This commit is contained in:
+6
-2
@@ -252,13 +252,17 @@ public abstract class GradleImportingTestCase extends ExternalSystemImportingTes
|
||||
|
||||
File zip = localDistribution.getZipFile();
|
||||
try {
|
||||
ZipFile zipFile = new ZipFile(zip);
|
||||
zipFile.close();
|
||||
if(zip.exists()) {
|
||||
ZipFile zipFile = new ZipFile(zip);
|
||||
zipFile.close();
|
||||
}
|
||||
}
|
||||
catch (ZipException e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("Corrupted file will be removed: " + zip.getPath());
|
||||
FileUtil.delete(zip);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user