Skip to content

Fix typos in ArchiveExtractor.java error messages #3971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2015
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