- push @prog_file_dirs, $programfiles_2 if not $programfiles_2 eq $PROGRAMFILES;
- }
- for my $prog_file_dir ( @prog_file_dirs ) {
- next if not -d $prog_file_dir;
- my @subdirs;
- my @globs = ( catfile($prog_file_dir, $PROG), catfile($prog_file_dir, $PROG.'-*') );
- for my $glob ( @globs ) {
- $glob = win32_space_escape( win32_double_bs( $glob ) );
- push @subdirs, glob $glob; # DosGlob
- }
- for my $subdir (@subdirs) {
- my $subdir2 = catfile($subdir, 'bin');
- if ( -d $subdir2 ) {
- my $subdir3 = catfile($subdir2, 'x64');
- if ( -d $subdir3 ) {
- push @r_dirs, $subdir3;
- }
- push @r_dirs, $subdir2;
- }
- push @r_dirs, $subdir;
+ if ( defined $programfiles_2 and $programfiles_2 ne $PROGRAMFILES ) {
+ push @prog_file_dirs, $programfiles_2;