1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2025-01-23 21:51:26 +01:00

Skip _OPTIONAL folders in ClientFileCollector.

This commit is contained in:
sk89q 2014-01-08 16:38:01 -08:00
parent adbc952c49
commit 091d8f5fdb

View File

@ -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();