Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions arduino-core/src/cc/arduino/utils/ArchiveExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void extract(File archiveFile, File destFolder, int stripPath, boolean ov
while (stripPath > 0) {
slash = name.indexOf("/", slash);
if (slash == -1) {
throw new IOException("Invalid archive: it must contains a single root folder");
throw new IOException("Invalid archive: it must contain a single root folder");
}
slash++;
stripPath--;
Expand All @@ -174,7 +174,7 @@ public void extract(File archiveFile, File destFolder, int stripPath, boolean ov

// Strip the common path prefix when requested
if (!name.startsWith(pathPrefix)) {
throw new IOException("Invalid archive: it must contains a single root folder while file " + name + " is outside " + pathPrefix);
throw new IOException("Invalid archive: it must contain a single root folder while file " + name + " is outside " + pathPrefix);
}
name = name.substring(pathPrefix.length());
if (name.isEmpty()) {
Expand All @@ -185,7 +185,7 @@ public void extract(File archiveFile, File destFolder, int stripPath, boolean ov
File outputLinkedFile = null;
if (isLink) {
if (!linkName.startsWith(pathPrefix)) {
throw new IOException("Invalid archive: it must contains a single root folder while file " + linkName + " is outside " + pathPrefix);
throw new IOException("Invalid archive: it must contain a single root folder while file " + linkName + " is outside " + pathPrefix);
}
linkName = linkName.substring(pathPrefix.length());
outputLinkedFile = new File(destFolder, linkName);
Expand Down