Updated the .schematic save routine to also create directories as required.

Dieser Commit ist enthalten in:
sk89q 2010-10-04 17:04:28 -07:00
Ursprung 414c3cf33d
Commit 48aeb58bbb

Datei anzeigen

@ -501,6 +501,12 @@ public class WorldEdit extends Plugin {
if (!filePath.substring(0, dirPath.length()).equals(dirPath)) {
player.sendMessage(Colors.Rose + "Invalid path for Schematic.");
} else {
// Create parent directories
File parent = f.getParentFile();
if (parent != null && !parent.exists()) {
parent.mkdirs();
}
session.getClipboard().saveSchematic(filePath);
logger.log(Level.INFO, player.getName() + " saved " + filePath);
player.sendMessage(Colors.LightPurple + filename + " saved.");