<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">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 &amp;&amp; -f $self-&gt;{archive});
         # fixed #32090
-        $self-&gt;{archive} =~ /\.(\w+)$/;
-        my $ext = ".$1";
+        my $ext = "";
+        if ($self-&gt;{archive} =~ /\.(\w+)$/) {
+          $ext = ".$1";
+        }
         $ext = $IsWindows ? '.exe' : '.sfx' if ( defined $args{'-sfx'} &amp;&amp; $args{'-sfx'} );
         $self-&gt;{archive} =~ s/\.\w+$/$ext/;
         $self-&gt;{archive} = CleanDir( $self-&gt;{archive} );
-        my $expr = $IsWindows ? '^([a-z_A-Z]:)?\/' : '^\/';
-        if ( $self-&gt;{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-&gt;{archive} !~ /$expr/ ) {
             $self-&gt;{archive} = getcwd() . '/' . $self-&gt;{archive};
+          }
         }
         $self-&gt;{archive} = CleanDir( $self-&gt;{archive} );
     }
@@ -242,19 +247,19 @@
 
     # new feature for using with nice
     $self-&gt;{nice} = '';
-    if ( $command =~ /^[x]/i ) {
+    if ( $command =~ /^"?[xX]/ ) {
         $self-&gt;{nice} .= '"nice"'
           if !IsEmpty($args{'-lowprio'})
             and $args{'-lowprio'}
             and $IsWindows;
     }
-    if ( $command =~ /^[a]/i ) {
+    if ( $command =~ /^"?[aA]/ ) {
         $self-&gt;{options} .= ' "-sfx"' if ( defined $args{'-sfx'} &amp;&amp; $args{'-sfx'} );
         $self-&gt;{options} .= ' "-r"' if ( !IsEmpty( $args{'-recurse'} ) );
         $self-&gt;{options} .= ' "-m"' . $args{'-mode'} if ( !IsEmpty( $args{'-mode'} ) );
         $self-&gt;{options} .= ' "-v"' . $args{'-size'} if ( !IsEmpty( $args{'-size'} ) );
     }
-    if ( $command =~ /^[levx]/i ) {
+    if ( $command =~ /^"?[levx]/i ) {
         $self-&gt;{options} .= ' "-v"' if ( !IsEmpty( $args{'-volume'} ) );
     }
 
@@ -374,7 +379,7 @@
 sub List {
     my ( $retour, %currfile, @attrib );
     my $self         = shift;
-    $self-&gt;{list}    = undef;
+    $self-&gt;{list}    = ();
     $self-&gt;{command} = '"vt"';
     $self-&gt;SetOptions( $self-&gt;{command}, @_ );
 
</pre></body></html>