Subject: | Perl::Dist::WiX::Directory v1.1 case and slash intolerant |
Perl::Dist::WiX::Directory fails to find directories if the case does
not match (including the volume, eg 'c:' ne 'C:') or if forward slashes
are used.
The following patch solves some of the problems, but perhaps using
File::Spec::canonpath or even MooseX::Types::Path::Class would be better.
@@ -117,7 +120,11 @@
#print " descend: $descend exact: $exact.\n" ;
# If we're at the correct path, exit with success!
- if ( ( defined $path ) && ( $path_to_find eq $path ) ) {
+ $path =~ s{\\}{/}g;
+ $path_to_find =~ s{\\}{/}g;
+ if ( lc $path_to_find eq lc $path
+ or lc "$path_to_find\\" eq lc $path
+ or lc $path_to_find eq lc "$path\\") {
$self->trace_line( 4, "Found $path.\n" );