diff --git a/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java b/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java index cf6416c2f..5b4896313 100644 --- a/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java +++ b/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java @@ -49,13 +49,17 @@ import processing.app.helpers.StringUtils; import java.io.File; import java.io.IOException; import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; import java.util.List; +import java.util.Set; import static processing.app.I18n.tr; public class SSHUploader extends Uploader { - private static final List FILES_NOT_TO_COPY = Arrays.asList(".DS_Store", ".Trash", "Thumbs.db", "__MACOSX"); + private static final Set FILES_NOT_TO_COPY = + Collections.unmodifiableSet(new HashSet(Arrays.asList(".DS_Store", ".Trash", "Thumbs.db", "__MACOSX"))); private final BoardPort port; @@ -223,7 +227,7 @@ public class SSHUploader extends Uploader { } for (File file : files) { - if (!StringUtils.stringContainsOneOf(file.getName(), FILES_NOT_TO_COPY)) { + if (!FILES_NOT_TO_COPY.contains(file.getName())) { if (file.isDirectory() && file.canExecute()) { scp.startFolder(file.getName()); recursiveSCP(file, scp);