mirror of
https://github.com/SKCraft/Launcher.git
synced 2025-01-20 21:21:19 +01:00
Check directories exist before trying to walk them
This commit is contained in:
parent
652d6bf5ec
commit
43ca90f74d
@ -285,7 +285,11 @@ public class CurseModsDialog extends JDialog {
|
||||
PackModScanner scanner = new PackModScanner(mapper);
|
||||
|
||||
ListenableFuture<?> future = ctx.getExecutor().submit(() -> {
|
||||
scanner.walk(new File(pack.getDirectory(), "cursemods"));
|
||||
File target = new File(pack.getDirectory(), "cursemods");
|
||||
|
||||
if (target.isDirectory()) {
|
||||
scanner.walk(target);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
|
@ -44,7 +44,11 @@ public class Creator {
|
||||
// Load plugins
|
||||
CreatorPluginLoader pluginLoader = new CreatorPluginLoader();
|
||||
try {
|
||||
pluginLoader.walk(new File(dataDir, "plugins"));
|
||||
File pluginsDir = new File(dataDir, "plugins");
|
||||
|
||||
if (pluginsDir.isDirectory()) {
|
||||
pluginLoader.walk(pluginsDir);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.severe("Could not walk plugin directory, plugins have not been loaded");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user