Skip to content

Commit

Permalink
delete file
Browse files Browse the repository at this point in the history
  • Loading branch information
Badbird5907 committed Jul 24, 2022
1 parent e03c83f commit afe3b20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public void download() {
}
if (artifact != null) {
InputStream is = build.details().downloadArtifact(artifact);
if (file.exists()) file.delete();
//download the file
downloadFile(file, is);
}
Expand All @@ -55,6 +54,7 @@ public void download() {
}

public void downloadFile(File file, InputStream is) throws IOException {
if (file.exists()) file.delete();
FileOutputStream fos = new FileOutputStream(file);
byte[] buffer = new byte[1024];
int len;
Expand Down

0 comments on commit afe3b20

Please sign in to comment.