summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2002-10-29 19:12:14 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2002-10-29 19:12:14 +0000
commit1197e1cdb378ad99f39c44ed30211b02525f018e (patch)
treec9f8727b3ea874381383f5454d6e285d0ee49d15
parent114a380550dcce7cc5e9a98663e4982657a9ecf0 (diff)
downloadgstreamer-plugins-base-1197e1cdb378ad99f39c44ed30211b02525f018e.tar.gz
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
-rwxr-xr-xtools/gst-launch-ext13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/gst-launch-ext b/tools/gst-launch-ext
index d61d34d31..193c2555e 100755
--- a/tools/gst-launch-ext
+++ b/tools/gst-launch-ext
@@ -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;
}