Commit 1197e1cd authored by Thomas Vander Stichele's avatar Thomas Vander Stichele
Browse files

fix two dots in one filename only get bit after last dot

Original commit message from CVS:
fix two dots in one filename
only get bit after last dot
parent 114a3805
......@@ -13,8 +13,17 @@ my (%pipes, %cfg);
sub extension
{
my $path = shift;
my $ext = (fileparse ($path, '\..*?'))[2];
$ext =~ s/^\.//;
my $ext;
# get only the bit after the last period. We don't deal with
# .tar.gz extensions do we ?
if ($path =~ /\./)
{
my $ext = $path;
$ext =~ s/^.*\.//;
}
else { $ext = ""; }
return $ext;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment