mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-09-18 21:33:01 +00:00
Fix the last PR
This commit is contained in:
parent
2fbc1f2704
commit
b2199df3f7
1 changed files with 3 additions and 3 deletions
|
@ -1,11 +1,11 @@
|
|||
From 216c519cf0932aae1322ad1ee23c32f0e12392ff Mon Sep 17 00:00:00 2001
|
||||
From 944340dc20538af72ea45e6c6970f67408892ef9 Mon Sep 17 00:00:00 2001
|
||||
From: Suddenly <suddenly@suddenly.coffee>
|
||||
Date: Tue, 8 Jul 2014 09:44:18 +1000
|
||||
Subject: [PATCH] Safer JSON Loading
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java
|
||||
index 9d1cb33..4695c5a 100644
|
||||
index 9d1cb33..71ae29e 100644
|
||||
--- a/src/main/java/net/minecraft/server/JsonList.java
|
||||
+++ b/src/main/java/net/minecraft/server/JsonList.java
|
||||
@@ -146,6 +146,17 @@ public class JsonList {
|
||||
|
@ -18,7 +18,7 @@ index 9d1cb33..4695c5a 100644
|
|||
+ org.bukkit.Bukkit.getLogger().log( java.util.logging.Level.INFO, "Unable to find file {0}, creating it.", this.c );
|
||||
+ } catch ( net.minecraft.util.com.google.gson.JsonSyntaxException ex )
|
||||
+ {
|
||||
+ org.bukkit.Bukkit.getLogger().log( java.util.logging.Level.WARN, "Unable to read file {0}, backing it up to {0}.backup and creating new copy.", this.c );
|
||||
+ org.bukkit.Bukkit.getLogger().log( java.util.logging.Level.WARNING, "Unable to read file {0}, backing it up to {0}.backup and creating new copy.", this.c );
|
||||
+ File backup = new File( this.c + ".backup" );
|
||||
+ this.c.renameTo( backup );
|
||||
+ this.c.delete();
|
||||
|
|
Loading…
Add table
Reference in a new issue