This should fix all issues regarding the "latest" version for all server types
Some checks failed
KnarCraft/Minecraft-Server-Launcher/pipeline/head There was a failure building this commit

This commit is contained in:
2020-08-15 20:40:46 +02:00
parent 70d064e590
commit 0bf355c4de
12 changed files with 389 additions and 67 deletions

View File

@ -100,7 +100,11 @@ public class JarDownloaderTest {
* Removes downloaded test jars
*/
private static void removeDownloadedFiles() {
File[] oldFiles = new File(targetDirectory).listFiles();
File target = new File(targetDirectory);
if (!target.exists() && !target.mkdirs()) {
throw new IllegalArgumentException("Unable to create the test files directory");
}
File[] oldFiles = target.listFiles();
if (oldFiles == null) {
throw new IllegalArgumentException("Unable to list files in jar test directory");
}