}
if (!mods.isEmpty()) {
File internalModsDir = new File(modDir, "mods");
if (!internalModsDir.exists()) {
if (!internalModsDir.mkdir()) {
throw new PlatformManagerException("Failed to create directory " + internalModsDir);
}
}
for (String modName: mods) {
File internalModDir = new File(internalModsDir, modName);
if (!internalModDir.exists()) {
ModuleIdentifier theModID = new ModuleIdentifier(modName);
ModuleZipInfo zipInfo = getModule(theModID);
if (zipInfo.filename != null) {
if (!internalModDir.mkdir()) {
throw new PlatformManagerException("Failed to create directory " + internalModDir);
}
unzipModuleData(internalModDir, zipInfo, true);
log.info("Module " + modName + " successfully installed in mods dir of " + modName);
// Now recurse so we bring in all of the deps
doPullInDependencies(internalModsDir, theModID);