forked from SteamWar/SteamWar
Hotfix: API Download is decompressed
This commit is contained in:
@@ -65,6 +65,10 @@ public class NodeData {
|
||||
private SchematicFormat nodeFormat;
|
||||
|
||||
public InputStream schemData() throws IOException {
|
||||
return schemData(true);
|
||||
}
|
||||
|
||||
public InputStream schemData(boolean decompress) throws IOException {
|
||||
try {
|
||||
return selSchemData.select(rs -> {
|
||||
rs.next();
|
||||
@@ -73,7 +77,11 @@ public class NodeData {
|
||||
if(rs.wasNull() || schemData.available() == 0) {
|
||||
throw new SecurityException("SchemData is null");
|
||||
}
|
||||
return new GZIPInputStream(schemData);
|
||||
if (decompress) {
|
||||
return new GZIPInputStream(schemData);
|
||||
} else {
|
||||
return schemData;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new SecurityException("SchemData is wrong", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user