mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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
This commit is contained in:
parent
114a380550
commit
1197e1cdb3
1 changed files with 11 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue