IzPack

Multi-file validation bug

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 4.3.2
  • Fix Version/s: 4.3.3, 5.0
  • Component/s: None
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    0

Description

Reported by Bram Van Dam on the user list, along with a patch:

Index: lib/com/izforge/izpack/panels/MultipleFileInputField.java
===================================================================
--- lib/com/izforge/izpack/panels/MultipleFileInputField.java   (revision 2876)
+++ lib/com/izforge/izpack/panels/MultipleFileInputField.java   (working copy)
@@ -243,7 +243,11 @@
    public boolean validateField(){
        boolean result = false;
        int fileCount = model.getSize();
-
+
+        if (fileCount == 0 && allowEmpty){
+            result = true;
+        }
+
        for (int i=0; i < fileCount; i++){
            result = validateFile((String) model.getElementAt(i));
            if (!result){

Activity

Hide
Julien Ponge added a comment -

Fixed.

Show
Julien Ponge added a comment - Fixed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: