Skip Menu |

This queue is for tickets about the Perl-Dist-WiX CPAN distribution.

Report information
The Basics
Id: 53821
Status: open
Priority: 0/
Queue: Perl-Dist-WiX

People
Owner: Nobody in particular
Requestors: BOLDRA [...] boldra.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.100
Fixed in: (no value)



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" );
Subject: Perl::Dist::WiX::Directory v1.1 case and slash intolerant/ invalid state
To be honest, Perl::Dist::WiX::Directory should not be able to get into a state where it has forward slashes, or end in a backslash, and the bug is that it can do so at all. It should throw an exception on the ->new call if that is tried. I need to fix *that* for the version that will build Strawberry Perl for January. [If you're generating a distribution in the root directory, you'll have other problems, and it's NOT recommended, which would be the only reason why there would be a slash at the end that could not be avoided. I should catch that in Perl-Dist-WiX's ->new() call via better type constraints {done in r11055 in SVN.} .] Thanks for the bug-catching. I didn't know about MooseX::Types::Path::Class, either - it could be useful. Will have to check that out. As for case, it should be a case-insensitive comparison, yes, and I'll do so.