Skip Menu |

This queue is for tickets about the Archive-Rar CPAN distribution.

Report information
The Basics
Id: 49934
Status: new
Priority: 0/
Queue: Archive-Rar

People
Owner: Nobody in particular
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.02
Fixed in: (no value)



Subject: cygwin mix with windows rar
On cygwin it is most likely a native windows rar.exe which does not understand cygwin paths. So rather use relative paths there, before we try to detect this. All tests pass now. -- Reini Urban
Subject: Archive-Rar-2.02-cygwin.patch
diffbk lib/Archive/Rar.pm diff -u lib/Archive/Rar.pm~ lib/Archive/Rar.pm --- lib/Archive/Rar.pm~ 2008-03-06 15:12:01.000000000 +0100 +++ lib/Archive/Rar.pm 2009-09-23 09:29:08.828125000 +0200 @@ -219,14 +219,19 @@ # goto Suite if ($command =~ /^[levx]/i && -f $self->{archive}); # fixed #32090 - $self->{archive} =~ /\.(\w+)$/; - my $ext = ".$1"; + my $ext = ""; + if ($self->{archive} =~ /\.(\w+)$/) { + $ext = ".$1"; + } $ext = $IsWindows ? '.exe' : '.sfx' if ( defined $args{'-sfx'} && $args{'-sfx'} ); $self->{archive} =~ s/\.\w+$/$ext/; $self->{archive} = CleanDir( $self->{archive} ); - my $expr = $IsWindows ? '^([a-z_A-Z]:)?\/' : '^\/'; - if ( $self->{archive} !~ /$expr/ ) { + # cygwin allows a mix of windows rar and cygwin paths + if ($^O ne 'cygwin') { + my $expr = $IsWindows ? '^([a-z_A-Z]:)?\/' : '^\/'; + if ( $self->{archive} !~ /$expr/ ) { $self->{archive} = getcwd() . '/' . $self->{archive}; + } } $self->{archive} = CleanDir( $self->{archive} ); } @@ -242,19 +247,19 @@ # new feature for using with nice $self->{nice} = ''; - if ( $command =~ /^[x]/i ) { + if ( $command =~ /^"?[xX]/ ) { $self->{nice} .= '"nice"' if !IsEmpty($args{'-lowprio'}) and $args{'-lowprio'} and $IsWindows; } - if ( $command =~ /^[a]/i ) { + if ( $command =~ /^"?[aA]/ ) { $self->{options} .= ' "-sfx"' if ( defined $args{'-sfx'} && $args{'-sfx'} ); $self->{options} .= ' "-r"' if ( !IsEmpty( $args{'-recurse'} ) ); $self->{options} .= ' "-m"' . $args{'-mode'} if ( !IsEmpty( $args{'-mode'} ) ); $self->{options} .= ' "-v"' . $args{'-size'} if ( !IsEmpty( $args{'-size'} ) ); } - if ( $command =~ /^[levx]/i ) { + if ( $command =~ /^"?[levx]/i ) { $self->{options} .= ' "-v"' if ( !IsEmpty( $args{'-volume'} ) ); } @@ -374,7 +379,7 @@ sub List { my ( $retour, %currfile, @attrib ); my $self = shift; - $self->{list} = undef; + $self->{list} = (); $self->{command} = '"vt"'; $self->SetOptions( $self->{command}, @_ );