From 0aa67727f54ef079d925f2d9c7977aff935fa1bd Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 12 Jul 2014 13:58:36 +0200 Subject: [PATCH] Fixed bug with flatfile format updater --- .../com/gmail/nossr50/database/FlatfileDatabaseManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java index 1dd0e8950..bca300508 100644 --- a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java @@ -736,13 +736,17 @@ public final class FlatfileDatabaseManager implements DatabaseManager { if (corrupted) { mcMMO.p.debug("Updating corrupted database line for player " + newCharacter[0]); - newLine = new StringBuilder(org.apache.commons.lang.StringUtils.join(newCharacter, ":")); } if (oldVersion != null) { mcMMO.p.debug("Updating database line for player " + character[0] + " from before version " + oldVersion); } + if (corrupted || oldVersion != null) { + newLine = new StringBuilder(org.apache.commons.lang.StringUtils.join(newCharacter, ":")); + newLine = newLine.append(":"); + } + writer.append(newLine).append("\r\n"); }