mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-09-29 23:57:35 +02:00
Close underlying stream on exception in FileStorage
This commit is contained in:
parent
8d87d3e930
commit
acb7cf1e7b
@ -65,7 +65,13 @@ public OutputStream writeMapTile(String mapId, TileType tileType, Vector2i tile)
|
|||||||
|
|
||||||
OutputStream os = AtomicFileHelper.createFilepartOutputStream(file);
|
OutputStream os = AtomicFileHelper.createFilepartOutputStream(file);
|
||||||
os = new BufferedOutputStream(os);
|
os = new BufferedOutputStream(os);
|
||||||
os = compression.compress(os);
|
|
||||||
|
try {
|
||||||
|
os = compression.compress(os);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
os.close();
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user