details: http://code.openbravo.com/erp/devel/pi/rev/5438aedafc40 changeset: 3975:5438aedafc40 user: Antonio Moreno <antonio.moreno <at> openbravo.com> date: Fri Jun 05 18:18:43 2009 +0200 summary: Fixed issue 8992. Now if the module folder cannot be deleted when uninstalling a module, an error message will be shown, instead of a 'Process completed succesfully' message.
diffstat: src/org/openbravo/erpCommon/modules/UninstallModule.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (20 lines): diff -r 484ba1af6b88 -r 5438aedafc40 src/org/openbravo/erpCommon/modules/UninstallModule.java --- a/src/org/openbravo/erpCommon/modules/UninstallModule.java Fri Jun 05 17:26:18 2009 +0200 +++ b/src/org/openbravo/erpCommon/modules/UninstallModule.java Fri Jun 05 18:18:43 2009 +0200 @@ -134,11 +134,15 @@ UninstallModuleData.insertLog(pool, (vars == null ? "0" : vars.getUser()), data[i].adModuleId, data[i].version, data[i].name, "Uninstalled module " + data[i].name + " - " + data[i].version, "D"); - final File f = new File(modulesBaseDir + "/" + data[i].javapackage); + final File f = new File(modulesBaseDir, data[i].javapackage); if (f.exists()) { if (!Utility.deleteDir(f)) { addLog("@CannotRemoveModule@ " + data[i].name, MSG_ERROR); log4j.error("Cannot remove module contents " + data[i].name); + } + if (f.exists()) { + addLog("@CannotRemoveModule@ " + data[i].name, MSG_ERROR); + log4j.error("Cannot remove module contents " + data[i].name); } else { addLog("@RemovedModule@ " + data[i].name, MSG_SUCCESS); log4j.info("Removed contents for module " + data[i].name); ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits