Updated createDefaultConfiguration() to create parent directories.

This commit is contained in:
sk89q 2011-03-27 11:18:30 -07:00
parent 20afbdf264
commit fd8c827bf1
2 changed files with 7 additions and 1 deletions

View File

@ -547,6 +547,12 @@ public LocalPlayer wrapPlayer(Player player) {
*/
public static void createDefaultConfiguration(File actual,
String defaultName) {
// Make parent directories
File parent = actual.getParentFile();
if (!parent.exists()) {
parent.mkdirs();
}
if (actual.exists()) {
return;

View File

@ -20,7 +20,7 @@
/**
*
* @author Michael
* @author sk89q
*/
public class StringFlag extends Flag<String> {