Fixed 13284: Fix mmc core upgrades to newer versions:
authorStefan Hühner <stefan.huehner@openbravo.com>
Tue, 11 May 2010 10:42:11 +0200
changeset 7129 ec442494990a
parent 7128 eced463e1bcd
child 7130 52699ba4b98f
child 7134 8a6462c8520c
Fixed 13284: Fix mmc core upgrades to newer versions:
- update list of folder to backup on a core update to match
renaming of src-diagnostics -> src-util/diagnostics
- if exception happens in doing core backup, log real exception
into logfile (but don't show in UI)
src/org/openbravo/erpCommon/modules/ImportModule.java
--- a/src/org/openbravo/erpCommon/modules/ImportModule.java	Mon May 10 19:02:54 2010 +0200
+++ b/src/org/openbravo/erpCommon/modules/ImportModule.java	Tue May 11 10:42:11 2010 +0200
@@ -606,7 +606,7 @@
         Zip.zip(core, obDir + "/backup_install/" + moduleInDB.javapackage + "-"
             + moduleInDB.version + ".zip", obDir);
       } catch (final Exception e) {
-        log4j.error("Error zipping module " + module.getName());
+        log4j.error("Error zipping module " + module.getName(), e);
         addLog("@ErrorDoingBackup@ " + module.getName(), MSG_ERROR);
         return false;
       }
@@ -628,7 +628,7 @@
         log4j.info("Removing old module version files...");
         Utility.deleteDir(new File(obDir + "/modules/" + moduleInDB.javapackage));
       } catch (final Exception e) {
-        log4j.error("Error zipping module " + module.getName());
+        log4j.error("Error zipping module " + module.getName(), e);
         addLog("@ErrorDoingBackup@ " + module.getName(), MSG_ERROR);
         return false;
       }
@@ -1389,7 +1389,7 @@
     core.add(new File(obDir + "/src"));
     core.add(new File(obDir + "/web"));
     core.add(new File(obDir + "/src-test"));
-    core.add(new File(obDir + "/src-diagnostics"));
+    core.add(new File(obDir + "/src-util"));
     File[] module = new File[core.size()];
     return core.toArray(module);
   }