mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
parent
29912a0ac9
commit
cce61f6aad
@ -51,13 +51,12 @@ public class GZippedJsonDownloader {
|
||||
|
||||
public void download(File tmpFile, Progress progress, String statusText, ProgressListener progressListener) throws Exception {
|
||||
try {
|
||||
new JsonDownloader(downloader, gzippedUrl).download(tmpFile, progress, statusText, progressListener);
|
||||
File gzipTmpFile = new File(tmpFile.getParentFile(), GzipUtils.getCompressedFilename(tmpFile.getName()));
|
||||
// remove eventual leftovers from previous downloads
|
||||
if (gzipTmpFile.exists()) {
|
||||
gzipTmpFile.delete();
|
||||
}
|
||||
tmpFile.renameTo(gzipTmpFile);
|
||||
new JsonDownloader(downloader, gzippedUrl).download(gzipTmpFile, progress, statusText, progressListener);
|
||||
decompress(gzipTmpFile, tmpFile);
|
||||
gzipTmpFile.delete();
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user