From f009cb66cbe3d2c21e2495dd6af9fd790598cecb Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Mon, 8 Dec 2008 10:46:25 +0000 Subject: [PATCH] FR [ 2406123 ] Ini.saveProperties fails if target directory does not exist --- looks/src/org/compiere/util/Ini.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/looks/src/org/compiere/util/Ini.java b/looks/src/org/compiere/util/Ini.java index c04282bcb6..fc95c15ffa 100644 --- a/looks/src/org/compiere/util/Ini.java +++ b/looks/src/org/compiere/util/Ini.java @@ -52,17 +52,18 @@ import org.compiere.model.ModelValidationEngine; * Load & Save INI Settings fopm property file * Initiated in Adempiere.startup * Settings activated in ALogin.getIni - *

- * Change log: - *

* * @author Jorg Janke * @version $Id$ + * + * @author Teo Sarca, www.arhipac.ro + *
  • FR [ 1658127 ] Select charset encoding on import + *
  • FR [ 2406123 ] Ini.saveProperties fails if target directory does not exist */ public final class Ini implements Serializable { + private static final long serialVersionUID = 1L; + /** Property file name */ public static final String ADEMPIERE_PROPERTY_FILE = "Adempiere.properties"; @@ -256,6 +257,7 @@ public final class Ini implements Serializable try { File f = new File(fileName); + f.getParentFile().mkdirs(); // Create all dirs if not exist - teo_sarca FR [ 2406123 ] fos = new FileOutputStream(f); s_prop.store(fos, "Adempiere"); fos.flush();