mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 21:19:00 +01:00
Don't save server properties when it's read only. Fixes BUKKIT-3250
This commit is contained in:
parent
0216d09033
commit
118682ce5c
@ -69,6 +69,11 @@ public class PropertyManager {
|
|||||||
FileOutputStream fileoutputstream = null;
|
FileOutputStream fileoutputstream = null;
|
||||||
|
|
||||||
try {
|
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);
|
fileoutputstream = new FileOutputStream(this.c);
|
||||||
this.properties.store(fileoutputstream, "Minecraft server properties");
|
this.properties.store(fileoutputstream, "Minecraft server properties");
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
|
Loading…
Reference in New Issue
Block a user