Move render-state file to data folder

This commit is contained in:
Blue (Lukas Rieger) 2019-11-23 22:11:04 +01:00
parent 4ed0731956
commit 12f577ef41
1 changed files with 2 additions and 2 deletions

View File

@ -215,7 +215,7 @@ public class SpongePlugin {
//load render-manager state
try {
File saveFile = configurationDir.resolve("rmstate").toFile();
File saveFile = config.getDataPath().resolve("rmstate").toFile();
saveFile.getParentFile().mkdirs();
if (saveFile.exists()) {
try (DataInputStream in = new DataInputStream(new GZIPInputStream(new FileInputStream(saveFile)))) {
@ -288,7 +288,7 @@ public class SpongePlugin {
if (updateHandler != null) updateHandler.flushTileBuffer(); //first write all buffered tiles to the render manager to save them too
if (renderManager != null) {
try {
File saveFile = configurationDir.resolve("rmstate").toFile();
File saveFile = config.getDataPath().resolve("rmstate").toFile();
saveFile.getParentFile().mkdirs();
if (saveFile.exists()) saveFile.delete();
saveFile.createNewFile();