1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

ArchiveExtractor was not making symlinks the right way

This commit is contained in:
Federico Fissore
2015-03-30 17:12:38 +02:00
parent ecde17b6e2
commit 1fcd6ff1ce
2 changed files with 5 additions and 5 deletions

View File

@ -112,7 +112,7 @@ public class ArchiveExtractor {
Map<File, File> hardLinks = new HashMap<File, File>();
Map<File, Integer> hardLinksMode = new HashMap<File, Integer>();
Map<File, File> symLinks = new HashMap<File, File>();
Map<File, String> symLinks = new HashMap<File, String>();
Map<File, Long> symLinksModifiedTimes = new HashMap<File, Long>();
// 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<File, File> entry : symLinks.entrySet()) {
for (Map.Entry<File, String> entry : symLinks.entrySet()) {
if (entry.getKey().exists() && overwrite) {
entry.getKey().delete();
}