diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-05-01 22:34:23 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-05-09 01:40:19 -0500 |
commit | cbd20ec9eae853ccd51d5395b5c0a180fa8c9499 (patch) | |
tree | 592a144f801202cd92472bc4b1ab8c0e8316a438 /src/main/java/net/minecraft/server/WorldNBTStorage.java | |
parent | ef7e14f9ef95c528a6bb05d7b46fab9f6858435a (diff) | |
download | craftbukkit-cbd20ec9eae853ccd51d5395b5c0a180fa8c9499.tar craftbukkit-cbd20ec9eae853ccd51d5395b5c0a180fa8c9499.tar.gz craftbukkit-cbd20ec9eae853ccd51d5395b5c0a180fa8c9499.tar.lz craftbukkit-cbd20ec9eae853ccd51d5395b5c0a180fa8c9499.tar.xz craftbukkit-cbd20ec9eae853ccd51d5395b5c0a180fa8c9499.zip |
Use a different temp file for each player to avoid corruption. Fixes BUKKIT-1607
Diffstat (limited to 'src/main/java/net/minecraft/server/WorldNBTStorage.java')
-rw-r--r-- | src/main/java/net/minecraft/server/WorldNBTStorage.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java index 517e2f8a..bf2a1ced 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java @@ -173,7 +173,7 @@ public class WorldNBTStorage implements PlayerFileData, IDataManager { NBTTagCompound nbttagcompound = new NBTTagCompound(); entityhuman.d(nbttagcompound); - File file1 = new File(this.playerDir, "_tmp_.dat"); + File file1 = new File(this.playerDir, entityhuman.name + ".dat~"); // CraftBukkit - don't save every player to the same file File file2 = new File(this.playerDir, entityhuman.name + ".dat"); NBTCompressedStreamTools.a(nbttagcompound, (OutputStream) (new FileOutputStream(file1))); |