mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-25 12:05:13 +01: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);
|
||||
os = new BufferedOutputStream(os);
|
||||
os = compression.compress(os);
|
||||
|
||||
try {
|
||||
os = compression.compress(os);
|
||||
} catch (IOException ex) {
|
||||
os.close();
|
||||
throw ex;
|
||||
}
|
||||
|
||||
return os;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user