Only try to create the downloads folder if it does not yet exist

This commit is contained in:
johni0702
2016-12-30 12:11:53 +01:00
parent 7ad19aa025
commit 4388d6977d

View File

@@ -67,9 +67,11 @@ public class ReplayModOnline {
@Mod.EventHandler @Mod.EventHandler
public void init(FMLInitializationEvent event) { public void init(FMLInitializationEvent event) {
if (!getDownloadsFolder().exists()){
if (!getDownloadsFolder().mkdirs()) { if (!getDownloadsFolder().mkdirs()) {
logger.warn("Failed to create downloads folder: " + getDownloadsFolder()); logger.warn("Failed to create downloads folder: " + getDownloadsFolder());
} }
}
new GuiHandler(this).register(); new GuiHandler(this).register();
FMLCommonHandler.instance().bus().register(this); FMLCommonHandler.instance().bus().register(this);