Skip to content

Commit

Permalink
Fix potentially reading non-file paths in NBTIO
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxNeedsSnacks committed Feb 18, 2024
1 parent cf605d7 commit 4d4a952
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4d4a952

Please sign in to comment.