From 4d4a95271ef5fed0aa9bca1cd4e1199d75f32be8 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 18 Feb 2024 20:02:35 +0100 Subject: [PATCH] Fix potentially reading non-file paths in NBTIO --- .../main/java/dev/latvian/mods/kubejs/util/NBTIOWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/dev/latvian/mods/kubejs/util/NBTIOWrapper.java b/common/src/main/java/dev/latvian/mods/kubejs/util/NBTIOWrapper.java index a5692855a..b750a6feb 100644 --- a/common/src/main/java/dev/latvian/mods/kubejs/util/NBTIOWrapper.java +++ b/common/src/main/java/dev/latvian/mods/kubejs/util/NBTIOWrapper.java @@ -11,7 +11,7 @@ public interface NBTIOWrapper { @Nullable static CompoundTag read(Path path) throws IOException { - if (Files.notExists(path)) { + if (!Files.isRegularFile(path)) { return null; }