@@ -145,7 +145,7 @@ public class CommandLineBagDriver {
145145 public static final String PARAM_FAIL_MODE = "failmode" ;
146146 public static final String PARAM_COMPRESSION_LEVEL = "compressionlevel" ;
147147 public static final String PARAM_MOVE = "move" ;
148- public static final String PARAM_INCLUDE_HIDDEN = "includehiddenfiles " ;
148+ public static final String PARAM_EXCLUDE_HIDDEN = "excludehiddenfiles " ;
149149
150150 public static final String VALUE_WRITER_FILESYSTEM = Format .FILESYSTEM .name ().toLowerCase ();
151151 public static final String VALUE_WRITER_ZIP = Format .ZIP .name ().toLowerCase ();
@@ -374,7 +374,7 @@ private void addOperation(String name, String help, Parameter[] params, String[]
374374 jsap .registerParameter (new Switch ( PARAM_HELP , JSAP .NO_SHORTFLAG , PARAM_HELP , "Prints help." ));
375375 jsap .registerParameter (new Switch (PARAM_VERBOSE , JSAP .NO_SHORTFLAG , PARAM_VERBOSE , "Reports progress of the operation to the console." ));
376376 jsap .registerParameter (new Switch (PARAM_LOG_VERBOSE , JSAP .NO_SHORTFLAG , PARAM_LOG_VERBOSE , "Reports progress of the operation to the log." ));
377- jsap .registerParameter (new Switch ( PARAM_INCLUDE_HIDDEN , JSAP .NO_SHORTFLAG , PARAM_INCLUDE_HIDDEN , "Include hidden files." ));
377+ jsap .registerParameter (new Switch ( PARAM_EXCLUDE_HIDDEN , JSAP .NO_SHORTFLAG , PARAM_EXCLUDE_HIDDEN , "Exclude hidden files." ));
378378
379379 this .operationMap .put (name , new Operation (name , jsap , help , examples ));
380380 }
@@ -616,12 +616,11 @@ private int performOperation(Operation operation, JSAPResult config) {
616616 }
617617
618618 BagFactory bagFactory = null ;
619- if (config .getBoolean (PARAM_INCLUDE_HIDDEN )) {
619+ if (config .getBoolean (PARAM_EXCLUDE_HIDDEN )) {
620+ bagFactory = new BagFactory (new NotHiddenFileSystemNodeFilter ());
621+ } else {
620622 // null filter will include all nodes, including hidden ones
621623 bagFactory = new BagFactory (null );
622- } else {
623- // The default should filter out hidden files
624- bagFactory = new BagFactory (new NotHiddenFileSystemNodeFilter ());
625624 }
626625
627626 Writer writer = null ;
0 commit comments