Close channel before replacing file with tmp file

This commit is contained in:
MrHua269
2025-06-15 10:09:03 +08:00
parent 4855a4f76f
commit 25b9e3f213

View File

@@ -1,6 +1,6 @@
--- /dev/null
+++ b/src/main/java/me/earthme/luminol/data/BufferedLinearRegionFile.java
@@ -1,0 +_,629 @@
@@ -1,0 +_,631 @@
+package me.earthme.luminol.data;
+
+import abomination.IRegionFile;
@@ -213,6 +213,8 @@
+ this.currentAcquiredIndex = tempChannel.size();
+ }
+
+ this.channel.close();
+
+ Files.move(
+ new File(this.filePath.toString() + ".tmp").toPath(),
+ this.filePath,