Closed authorblues closed 11 years ago
Nothing I'm aware of. Any idea what might be causing it? What's going on exactly?
The behavior seems to be specific to SportBukkit+Windows (I know, I know), but AutoReferee tries to delete world folders when a temporary world is unloaded. This typically is fine, but the Windows file lock doesn't seem to be released, so the folder can't be deleted. The reports I have heard seems to suggest that it doesn't happen in CB, and I've never heard of such a problem with non-Windows servers.
I don't suspect that SportBukkit is directly to blame, and perhaps the reports I'm getting are incorrect and it still happens on CB, but I need to figure out why those file locks aren't getting released, because it causes those dead world folders to accumulate. Maybe I'll poke around in CB.
Are you passing a save flag while unloading a world? From what I've tested, the file lock isn't released if you don't save a world's data. Use Bukkit.unloadWorld(name, true);
.
I've never heard of that being an issue, but I currently use Bukkit.unloadWorld(name, false);
. I'm willing to give this a shot, but that's bizarre if that's actually the problem.
https://github.com/rmct/AutoReferee/commit/677bb8852584fe36743aa17aebfd9c82d686705b seems to have helped, strangely. Will need to test more, but this is very promising. Thanks @hexacyanide!
Seems fixed to my liking.
Probably should have mentioned this earlier, but PGM uses this.server.unloadWorld(match.getWorld(), true);
Yeah, but no worries. Just happy to have it figured out. Now if I could only figure out what black magic is causing #160
SportBukkit seems to have some trouble releasing file locks appropriately (or, at least, behavior seems to be inconsistent with CraftBukkit), which is necessary for AutoReferee to cleanup old world folders (only on Windows). This may be something to discuss with @mrapple to see if he knows anything about it, but perhaps is a lost cause.