From 7f10f74b913b3f912251f399ea1add4da8fa10a0 Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Wed, 22 Jun 2005 09:40:25 +0000 Subject: [PATCH] Fix Archive-Tar tests on Win32 (Patch from Jos Boumans, from his current dev version.) p4raw-id: //depot/perl@24935 --- lib/Archive/Tar.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/Archive/Tar.pm b/lib/Archive/Tar.pm index e2b1631..ecb6aba 100644 --- a/lib/Archive/Tar.pm +++ b/lib/Archive/Tar.pm @@ -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 ) ) { -- 2.7.4