patch crash no mods folder
This commit is contained in:
@@ -31,6 +31,13 @@ public class IntegrityChecker {
|
|||||||
installedMods = new TreeMap<>();
|
installedMods = new TreeMap<>();
|
||||||
modsMap.delete();
|
modsMap.delete();
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
try {
|
||||||
|
modsMap.createNewFile();
|
||||||
|
} catch (IOException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(modsMap));
|
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(modsMap));
|
||||||
|
|||||||
@@ -6,9 +6,18 @@ import java.io.FileNotFoundException;
|
|||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) throws FileNotFoundException, IOException, URISyntaxException {
|
public static void main(String[] args) throws FileNotFoundException, IOException, URISyntaxException {
|
||||||
|
try {
|
||||||
|
Files.createDirectories(Paths.get("mods"));
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log.e("HTTPHelper","could not create folder");
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
IntegrityChecker updateManager = new IntegrityChecker();
|
IntegrityChecker updateManager = new IntegrityChecker();
|
||||||
Database db = new Database();
|
Database db = new Database();
|
||||||
|
|||||||
Reference in New Issue
Block a user