1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-27 12:46:22 +01:00

Fix URL override still resulting in a (broken) file copy.

This commit is contained in:
sk89q 2015-07-23 23:54:33 -07:00
parent 0cc95225dd
commit 7416e53994

View File

@ -65,8 +65,10 @@ public class ClientFileCollector extends DirectoryWalker {
// url.txt override file
File urlFile = new File(file.getAbsoluteFile().getParentFile(), file.getName() + URL_FILE_SUFFIX);
String location;
boolean copy = true;
if (urlFile.exists()) {
location = Files.readFirstLine(urlFile, Charset.defaultCharset());
copy = false;
} else {
location = hash.substring(0, 2) + "/" + hash.substring(2, 4) + "/" + hash;
}
@ -79,7 +81,9 @@ public class ClientFileCollector extends DirectoryWalker {
applicator.apply(entry);
destPath.getParentFile().mkdirs();
ClientFileCollector.log.info(String.format("Adding %s from %s...", relPath, file.getAbsolutePath()));
Files.copy(file, destPath);
if (copy) {
Files.copy(file, destPath);
}
manifest.getTasks().add(entry);
}