From 682c72e5190e8a56445b00c2956fdd6bbc807d06 Mon Sep 17 00:00:00 2001 From: Madeline Miller Date: Tue, 11 Jul 2023 22:16:25 +1000 Subject: [PATCH] Stop double-ungzipping schematic format checks. Fixes #2356 --- .../sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java index d04d150b5..627d29a07 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java @@ -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;