Temporary fix to ConfigFileHandling crashing when creating the file

This commit is contained in:
James Seibel
2023-08-17 22:17:50 -05:00
parent ff3949f353
commit c80136719d
@@ -10,6 +10,7 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftSha
import org.apache.logging.log4j.Logger;
import java.io.IOException;
import java.nio.file.FileAlreadyExistsException;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -249,7 +250,12 @@ public class ConfigFileHandling
System.out.println("File at [" + this.configPath + "] was " + (fileDeleted? "": "not ") + "able to be deleted.");
Files.createFile(this.configPath);
try
{
Files.createFile(this.configPath);
}
catch (FileAlreadyExistsException ignore) { /* temporary fix due to windows/Intellij issues either locking or changing the permissions of the file */ }
config.load();
}
catch (IOException ex)