This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix Archive-Tar tests on Win32
authorSteve Hay <SteveHay@planit.com>
Wed, 22 Jun 2005 09:40:25 +0000 (09:40 +0000)
committerSteve Hay <SteveHay@planit.com>
Wed, 22 Jun 2005 09:40:25 +0000 (09:40 +0000)
(Patch from Jos Boumans, from his current dev version.)

p4raw-id: //depot/perl@24935

lib/Archive/Tar.pm

index e2b1631..ecb6aba 100644 (file)
@@ -14,7 +14,7 @@ use vars qw[$DEBUG $error $VERSION $WARN $FOLLOW_SYMLINK $CHOWN $CHMOD
 $DEBUG              = 0;
 $WARN               = 1;
 $FOLLOW_SYMLINK     = 0;
-$VERSION            = "1.24";
+$VERSION            = "1.24_01";
 $CHOWN              = 1;
 $CHMOD              = 1;
 $DO_NOT_USE_PREFIX  = 0;
@@ -479,8 +479,15 @@ sub _extract_file {
 
                             ### splitpath takes a bool at the end to indicate
                             ### that it's splitting a dir
-    my ($vol,$dirs,$file) = File::Spec::Unix->splitpath(    $name,
-                                                            $entry->is_dir );
+    my ($vol,$dirs,$file);
+    if ( defined $alt ) { # It's a local-OS path
+        ($vol,$dirs,$file) = File::Spec->splitpath(       $alt,
+                                                          $entry->is_dir );
+    } else {
+        ($vol,$dirs,$file) = File::Spec::Unix->splitpath( $name,
+                                                          $entry->is_dir );
+    }
+
     my $dir;
     ### is $name an absolute path? ###
     if( File::Spec->file_name_is_absolute( $dirs ) ) {