mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-20 09:52:13 +01:00
Improved sanity checks on filenames in package_index.json
This commit is contained in:
parent
0f5d22c67c
commit
b811689e97
@ -62,7 +62,9 @@ public class DownloadableContributionsDownloader {
|
||||
|
||||
public File download(DownloadableContribution contribution, Progress progress, final String statusText, ProgressListener progressListener, boolean noResume, boolean allowCache) throws Exception {
|
||||
URL url = new URL(contribution.getUrl());
|
||||
Path outputFile = Paths.get(stagingFolder.getAbsolutePath(), contribution.getArchiveFileName());
|
||||
// Filter out paths from file name
|
||||
String filename = new File(contribution.getArchiveFileName()).getName();
|
||||
Path outputFile = Paths.get(stagingFolder.getAbsolutePath(), filename);
|
||||
|
||||
// Ensure the existence of staging folder
|
||||
Files.createDirectories(stagingFolder.toPath());
|
||||
|
Loading…
x
Reference in New Issue
Block a user