mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-01-18 12:34:20 +08:00
Stop double-ungzipping schematic format checks. Fixes #2356
This commit is contained in:
parent
6770ada5e1
commit
682c72e519
@ -25,7 +25,6 @@
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Set;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
/**
|
||||
* A collection of supported clipboard formats.
|
||||
@ -71,7 +70,7 @@ public interface ClipboardFormat {
|
||||
* @return true if the given file is of this format
|
||||
*/
|
||||
default boolean isFormat(File file) {
|
||||
try (InputStream stream = new GZIPInputStream(Files.newInputStream(file.toPath()))) {
|
||||
try (InputStream stream = Files.newInputStream(file.toPath())) {
|
||||
return isFormat(stream);
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user