diff --git a/arduino-core/src/cc/arduino/utils/ArchiveExtractor.java b/arduino-core/src/cc/arduino/utils/ArchiveExtractor.java index d8d1c1b07..8e4ed800d 100644 --- a/arduino-core/src/cc/arduino/utils/ArchiveExtractor.java +++ b/arduino-core/src/cc/arduino/utils/ArchiveExtractor.java @@ -112,7 +112,7 @@ public class ArchiveExtractor { Map hardLinks = new HashMap(); Map hardLinksMode = new HashMap(); - Map symLinks = new HashMap(); + Map symLinks = new HashMap(); Map symLinksModifiedTimes = new HashMap(); // Cycle through all the archive entries @@ -227,7 +227,7 @@ public class ArchiveExtractor { hardLinks.put(outputFile, outputLinkedFile); hardLinksMode.put(outputFile, mode); } else if (isSymLink) { - symLinks.put(outputFile, outputLinkedFile); + symLinks.put(outputFile, linkName); symLinksModifiedTimes.put(outputFile, modifiedTime); } else { // Create the containing folder if not exists @@ -255,7 +255,7 @@ public class ArchiveExtractor { } } - for (Map.Entry entry : symLinks.entrySet()) { + for (Map.Entry entry : symLinks.entrySet()) { if (entry.getKey().exists() && overwrite) { entry.getKey().delete(); } diff --git a/arduino-core/src/processing/app/Platform.java b/arduino-core/src/processing/app/Platform.java index 6a03bb4d3..cd80790a9 100644 --- a/arduino-core/src/processing/app/Platform.java +++ b/arduino-core/src/processing/app/Platform.java @@ -216,8 +216,8 @@ public class Platform { return System.getProperty("os.arch"); } - public void symlink(File something, File somewhere) throws IOException, InterruptedException { - Process process = Runtime.getRuntime().exec(new String[]{"ln", "-s", something.getAbsolutePath(), somewhere.getAbsolutePath()}, null, null); + public void symlink(String something, File somewhere) throws IOException, InterruptedException { + Process process = Runtime.getRuntime().exec(new String[]{"ln", "-s", something, somewhere.getAbsolutePath()}, null, somewhere.getParentFile()); process.waitFor(); }