From 62073fa488348964c351cc2a905976f4203fe210 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 2 May 2015 01:21:21 +1000 Subject: [PATCH] file save --- .../intellectualsites/translation/YamlTranslationFile.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PlotSquared/src/main/java/com/intellectualsites/translation/YamlTranslationFile.java b/PlotSquared/src/main/java/com/intellectualsites/translation/YamlTranslationFile.java index 82021070e..9111c8d72 100644 --- a/PlotSquared/src/main/java/com/intellectualsites/translation/YamlTranslationFile.java +++ b/PlotSquared/src/main/java/com/intellectualsites/translation/YamlTranslationFile.java @@ -137,6 +137,10 @@ public class YamlTranslationFile extends TranslationFile { @Override public void saveFile() { try { + if (!this.file.exists()) { + this.file.getParentFile().mkdirs(); + this.file.createNewFile(); + } final FileWriter writer = new FileWriter(this.file); // String s = getYaml().dump(map); if ((this.header != null) && !this.fancyHead) {