mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 18:45:21 +01:00
Always reset the maps render state if purging started
This commit is contained in:
parent
00d7d3e397
commit
f4926fe72d
@ -68,20 +68,22 @@ public void doWork() throws Exception {
|
|||||||
this.hasMoreWork = false;
|
this.hasMoreWork = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete subFiles first to be able to track the progress and cancel
|
try {
|
||||||
while (!subFiles.isEmpty()) {
|
// delete subFiles first to be able to track the progress and cancel
|
||||||
Path subFile = subFiles.getLast();
|
while (!subFiles.isEmpty()) {
|
||||||
FileUtils.delete(subFile.toFile());
|
Path subFile = subFiles.getLast();
|
||||||
subFiles.removeLast();
|
FileUtils.delete(subFile.toFile());
|
||||||
if (this.cancelled) return;
|
subFiles.removeLast();
|
||||||
}
|
if (this.cancelled) return;
|
||||||
|
}
|
||||||
|
|
||||||
// make sure everything is deleted
|
// make sure everything is deleted
|
||||||
FileUtils.delete(directory.toFile());
|
FileUtils.delete(directory.toFile());
|
||||||
|
} finally {
|
||||||
// reset map render state
|
// reset map render state
|
||||||
if (this.map != null) {
|
if (this.map != null) {
|
||||||
this.map.getRenderState().reset();
|
this.map.getRenderState().reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user