From 091d8f5fdb5f3e6b8834e6f534f0f8caf71c90e9 Mon Sep 17 00:00:00 2001 From: sk89q Date: Wed, 8 Jan 2014 16:38:01 -0800 Subject: [PATCH] Skip _OPTIONAL folders in ClientFileCollector. --- .../com/skcraft/launcher/builder/ClientFileCollector.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/skcraft/launcher/builder/ClientFileCollector.java b/src/main/java/com/skcraft/launcher/builder/ClientFileCollector.java index f2efdd2..1d37232 100644 --- a/src/main/java/com/skcraft/launcher/builder/ClientFileCollector.java +++ b/src/main/java/com/skcraft/launcher/builder/ClientFileCollector.java @@ -32,7 +32,7 @@ public class ClientFileCollector extends DirectoryWalker { * Create a new collector. * * @param manifest the manifest - * @param destDir the destination directory to copy the hashed objects + * @param destDir the destination directory to copy the hashed objects */ public ClientFileCollector(@NonNull Manifest manifest, @NonNull File destDir) { this.manifest = manifest; @@ -41,7 +41,9 @@ public class ClientFileCollector extends DirectoryWalker { @Override public DirectoryBehavior getBehavior(@NonNull String name) { - if (name.equals("_SERVER")) { + if (name.equals("_OPTIONAL")) { + return DirectoryBehavior.SKIP; + } else if (name.equals("_SERVER")) { return DirectoryBehavior.SKIP; } else if (name.equals("_CLIENT")) { return DirectoryBehavior.IGNORE; @@ -50,6 +52,8 @@ public class ClientFileCollector extends DirectoryWalker { } } +} + @Override protected void onFile(File file, String relPath) throws IOException { FileInstall task = new FileInstall();