@@ -477,28 +477,27 @@ public static String[] parseOptions(String[] argv) throws ParseException {
477
477
}
478
478
);
479
479
480
- parser .on ("-C" , "--canonicalRoot" , "=/path/" ,
481
- "Allow symlinks to canonical targets starting with the specified" ,
482
- "root without otherwise needing to specify -N,--symlink for such" ,
483
- "symlinks. A canonical root must end with a file separator. For" ,
484
- "security a canonical root cannot be the root directory." ,
485
- "Option may be repeated." ).Do (v -> {
486
- String root = (String ) v ;
487
- if (!root .endsWith ("/" ) && !root .endsWith ("\\ " )) {
488
- die ("--canonicalRoot must end with a separator" );
489
- }
490
- if (root .equals ("/" ) || root .equals ("\\ " )) {
491
- die ("--canonicalRoot cannot be the root directory" );
492
- }
493
- canonicalRoots .add (root );
494
- });
495
-
496
480
parser .on ("-c" , "--ctags" , "=/path/to/ctags" ,
497
481
"Path to Universal Ctags" ,
498
482
"By default takes the Universal Ctags in PATH." ).
499
483
Do (ctagsPath -> cfg .setCtags ((String ) ctagsPath )
500
484
);
501
485
486
+ parser .on ("--canonicalRoot" , "=/path/" ,
487
+ "Allow symlinks to canonical targets starting with the specified root" ,
488
+ "without otherwise needing to specify -N,--symlink for such symlinks. A" ,
489
+ "canonical root must end with a file separator. For security, a canonical" ,
490
+ "root cannot be the root directory. Option may be repeated." ).Do (v -> {
491
+ String root = (String ) v ;
492
+ if (!root .endsWith ("/" ) && !root .endsWith ("\\ " )) {
493
+ die ("--canonicalRoot must end with a separator" );
494
+ }
495
+ if (root .equals ("/" ) || root .equals ("\\ " )) {
496
+ die ("--canonicalRoot cannot be the root directory" );
497
+ }
498
+ canonicalRoots .add (root );
499
+ });
500
+
502
501
parser .on ("--checkIndexVersion" ,
503
502
"Check if current Lucene version matches index version" ).Do (v -> {
504
503
checkIndexVersion = true ;
@@ -598,9 +597,10 @@ public static String[] parseOptions(String[] argv) throws ParseException {
598
597
.Do (mandocPath -> cfg .setMandoc ((String ) mandocPath ));
599
598
600
599
parser .on ("-N" , "--symlink" , "=/path/to/symlink" ,
601
- "Allow this symlink to be followed. Option may be repeated." ,
602
- "By default only symlinks directly under source root directory" ,
603
- "are allowed. See also -C,--canonicalRoot" ).Do (v ->
600
+ "Allow the symlink to be followed. Other symlinks targeting the same" ,
601
+ "canonical target or canonical children will be allowed too. Option may" ,
602
+ "be repeated. (By default only symlinks directly under source root" ,
603
+ "directory are allowed. See also --canonicalRoot)" ).Do (v ->
604
604
allowedSymlinks .add ((String ) v ));
605
605
606
606
parser .on ("-n" , "--noIndex" ,
0 commit comments