my %all_associations = (%$file_associations, %$add_associations);
-my $num = 0;
-my $i4jcount = 0;
my @ordered = (@put_first, @non_primary);
for my $key (sort keys %all_associations) {
next if grep($_ eq $key, @ordered);
push(@ordered, $key);
}
-for my $key (@ordered) {
- my $a = $all_associations{$key};
- next if (ref($a) ne "HASH");
-
- my $extensions = $a->{extensions};
- my @extensions = @$extensions;
-
- $num++
-}
+my $num = $#ordered + 1;
warn("--\n");
+my $i4jcount = 0;
for my $shortname (@ordered) {
my $a = $all_associations{$shortname};
next if (ref($a) ne "HASH");
my $ext = join(",",sort(@extensions));
my $xdisplayext = xml_escape(join(", ", map(".$_",sort(@extensions))));
- $i4jcount++;
my $progresspercent = int(($i4jcount/$num)*100);
$progresspercent = 100 if $progresspercent > 100;
+ $i4jcount++;
my $xext = xml_escape($ext);
my $addunixextension = "true";