Throw an exception if we're unable to create the lib dir

This commit is contained in:
Luck 2017-10-16 15:28:02 +01:00
parent 6bfeec6d16
commit 74069af309
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -100,7 +100,9 @@ public class DependencyManager {
plugin.getLog().info("Identified the following dependencies: " + dependencies.toString());
File libDir = new File(plugin.getDataDirectory(), "lib");
libDir.mkdirs();
if (!(libDir.exists() || libDir.mkdirs())) {
throw new RuntimeException("Unable to create lib dir - " + libDir.getPath());
}
// Download files.
List<File> filesToLoad = new ArrayList<>();