details:   https://code.openbravo.com/erp/devel/pi/rev/e62c79a1253e
changeset: 17697:e62c79a1253e
user:      Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> 
openbravo.com>
date:      Wed Aug 15 18:38:46 2012 +0530
summary:   Related to issue 21246 : Null Pointer Exception while installing 
modules

Handles the case when the folder exists but does not have the proper 
permissions.

diffstat:

 src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 54c9e821596d -r e62c79a1253e 
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java        Thu Aug 
16 16:06:08 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java        Wed Aug 
15 18:38:46 2012 +0530
@@ -2636,6 +2636,10 @@
     if (!sources.exists()) {
       throw new OBException(Utility.messageBD(this, "WrongPathError", 
vars.getLanguage()));
     }
+    //Added to check write access
+    if(!sources.canWrite()) {
+       throw new OBException(Utility.messageBD(this, "NoApplicableModules", 
vars.getLanguage()));
+    }
     File model = new File(sources, "src-db/database/model/tables");
     if (model.exists()) {
       modelFiles.add(model);

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to