mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 02:26:00 +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;
|
||||
}
|
||||
|
||||
// delete subFiles first to be able to track the progress and cancel
|
||||
while (!subFiles.isEmpty()) {
|
||||
Path subFile = subFiles.getLast();
|
||||
FileUtils.delete(subFile.toFile());
|
||||
subFiles.removeLast();
|
||||
if (this.cancelled) return;
|
||||
}
|
||||
try {
|
||||
// delete subFiles first to be able to track the progress and cancel
|
||||
while (!subFiles.isEmpty()) {
|
||||
Path subFile = subFiles.getLast();
|
||||
FileUtils.delete(subFile.toFile());
|
||||
subFiles.removeLast();
|
||||
if (this.cancelled) return;
|
||||
}
|
||||
|
||||
// make sure everything is deleted
|
||||
FileUtils.delete(directory.toFile());
|
||||
|
||||
// reset map render state
|
||||
if (this.map != null) {
|
||||
this.map.getRenderState().reset();
|
||||
// make sure everything is deleted
|
||||
FileUtils.delete(directory.toFile());
|
||||
} finally {
|
||||
// reset map render state
|
||||
if (this.map != null) {
|
||||
this.map.getRenderState().reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user