--- bin/cpan2rpm 2007-03-01 01:35:31 +0200 +++ bin/cpan2rpm 2007-05-31 18:43:35 +0300 @@ -1172,7 +1172,11 @@ chomp($_ = qx/$cmd/); $_ = (split)[5] unless $zip; - $dst .= "/$1" if m|^(\S+)/|; + if (-d $dst.'/'.$_) { # many CPAN tarballs has directory w/o trailing / + $dst .= "/$_"; # example is VCP-autrijus-snapshot-0.9-20050110.tar.gz + } elsif (~m|^(\S+)/|) { + $dst .= "/$1"; + } $dst =~ s|/*$||; # path shouldn't end in / or tardir gets wiped $dst =~ s|\./||; # paths in tarballs shouldn't be relative return $dst;