Stop double-ungzipping schematic format checks. Fixes #2356

This commit is contained in:
Madeline Miller 2023-07-11 22:16:25 +10:00
parent 6770ada5e1
commit 682c72e519
No known key found for this signature in database
GPG Key ID: B8EA2E5693115D81

View File

@ -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;