Skip to content

Commit aec5dfc

Browse files
cmaglielmihalkovic
authored andcommitted
Remove unnecessary rename in GZippedJsonDownloader
See arduino#4361
1 parent 01c0aba commit aec5dfc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: arduino-core/src/cc/arduino/contributions/GZippedJsonDownloader.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,12 @@ public GZippedJsonDownloader(DownloadableContributionsDownloader downloader, URL
5151

5252
public void download(File tmpFile, Progress progress, String statusText, ProgressListener progressListener) throws Exception {
5353
try {
54-
new JsonDownloader(downloader, gzippedUrl).download(tmpFile, progress, statusText, progressListener);
5554
File gzipTmpFile = new File(tmpFile.getParentFile(), GzipUtils.getCompressedFilename(tmpFile.getName()));
5655
// remove eventual leftovers from previous downloads
5756
if (gzipTmpFile.exists()) {
5857
gzipTmpFile.delete();
5958
}
60-
tmpFile.renameTo(gzipTmpFile);
59+
new JsonDownloader(downloader, gzippedUrl).download(gzipTmpFile, progress, statusText, progressListener);
6160
decompress(gzipTmpFile, tmpFile);
6261
gzipTmpFile.delete();
6362
} catch (Exception e) {

0 commit comments

Comments
 (0)