Don't save server properties when it's read only. Fixes BUKKIT-3250

This commit is contained in:
feildmaster 2012-12-21 15:21:34 -06:00
parent 0216d09033
commit 118682ce5c

View File

@ -69,6 +69,11 @@ public class PropertyManager {
FileOutputStream fileoutputstream = null;
try {
// CraftBukkit start - Don't attempt writing to file if it's read only
if (!this.c.canWrite()) {
return;
}
// CraftBukkit end
fileoutputstream = new FileOutputStream(this.c);
this.properties.store(fileoutputstream, "Minecraft server properties");
} catch (Exception exception) {