Skip to content

Commit

Permalink
Move render-state file to data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Nov 23, 2019
1 parent 4ed0731 commit 12f577e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public synchronized void load() throws ExecutionException, IOException, NoSuchRe

//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)))) {
Expand Down Expand Up @@ -288,7 +288,7 @@ public synchronized void unload() {
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();
Expand Down

0 comments on commit 12f577e

Please sign in to comment.