1
0
mirror of https://github.com/kami-blue/client synced 2025-02-14 19:27:01 +00:00

Use the correct exception for KAMILastConfig

This commit is contained in:
Ridan Vandenbergh 2019-08-06 17:15:08 +02:00
parent a0420e3ac5
commit ba54b66182

View File

@ -33,6 +33,7 @@ import org.apache.logging.log4j.Logger;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
@ -117,7 +118,7 @@ public class KamiMod {
try(BufferedReader reader = Files.newBufferedReader(config)) {
kamiConfigName = reader.readLine();
if (!isFilenameValid(kamiConfigName)) kamiConfigName = KAMI_CONFIG_NAME_DEFAULT;
} catch (FileNotFoundException e) {
} catch (NoSuchFileException e) {
try(BufferedWriter writer = Files.newBufferedWriter(config)) {
writer.write(KAMI_CONFIG_NAME_DEFAULT);
} catch (IOException e1) {