diff options
Diffstat (limited to 'cpan/Archive-Tar/t/02_methods.t')
-rw-r--r-- | cpan/Archive-Tar/t/02_methods.t | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t index 7b212f63a6..b740594203 100644 --- a/cpan/Archive-Tar/t/02_methods.t +++ b/cpan/Archive-Tar/t/02_methods.t @@ -63,6 +63,20 @@ my $LONG_FILE = qq[directory/really-really-really-really-really-really-really-re my $TOO_LONG = ($^O eq 'MSWin32' or $^O eq 'cygwin' or $^O eq 'VMS') && length( cwd(). $LONG_FILE ) > 247; +if(!$TOO_LONG) { + my $alt = File::Spec->catfile( cwd(), $LONG_FILE); + eval 'mkpath([$alt]);'; + if($@) + { + $TOO_LONG = 1; + } + else + { + $@ = ''; + my $base = File::Spec->catfile( cwd(), 'directory'); + rmtree $base; + } +} ### warn if we are going to skip long file names if ($TOO_LONG) { diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE}; |