This commit is contained in:
parent
46850a2430
commit
d332b1264d
2 changed files with 5 additions and 4 deletions
|
|
@ -399,7 +399,7 @@ void default_nav(FILE* out, const char* top, xl_node_t* element, int indent) {
|
|||
|
||||
excludes = xl_get_path(element, "exclude");
|
||||
|
||||
xml = scan_xml("site/content/", "", excludes, strcmp(layer, "*") == 0 ? -0xffff : (atoi(layer) - 1));
|
||||
xml = scan_xml("site/content/", "", excludes, strcmp(layer, "*") == 0 ? 0xffff : (atoi(layer) - 1));
|
||||
|
||||
if(excludes != NULL) free(excludes);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ sub scan {
|
|||
my @args = @_;
|
||||
my $path = $args[0];
|
||||
my $top = $args[1];
|
||||
my $dirname = $args[2];
|
||||
|
||||
opendir(my $dh, $path);
|
||||
|
||||
|
|
@ -22,11 +23,11 @@ sub scan {
|
|||
}
|
||||
|
||||
if(-d "$path/$file"){
|
||||
scan("$path/$file", $top);
|
||||
scan("$path/$file", $top, $dirname . $file . "/");
|
||||
}else{
|
||||
print("$path/$file\n");
|
||||
|
||||
my $dir = "$ARGV[1]/$file";
|
||||
my $dir = "$ARGV[1]/$dirname$file";
|
||||
|
||||
$dir =~ s/\..*$//;
|
||||
|
||||
|
|
@ -40,5 +41,5 @@ sub scan {
|
|||
}
|
||||
|
||||
for(my $i = 2; $i < @ARGV; $i += 1){
|
||||
scan($ARGV[$i], $ARGV[$i]);
|
||||
scan($ARGV[$i], $ARGV[$i], "");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue