From 6dc847d0755f831b1df57b2f4ac54285dca60e9c Mon Sep 17 00:00:00 2001
From: Boris Bobrov <breton@cynicmansion.ru>
Date: Fri, 20 Mar 2015 02:25:10 +0300
Subject: [PATCH] fixed 5068
---
mediagoblin/media_types/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mediagoblin/media_types/__init__.py b/mediagoblin/media_types/__init__.py
index 3eeead8..97e4fac 100644
a
|
b
|
def get_media_type_and_manager(filename):
|
84 | 84 | |
85 | 85 | This hook is deprecated, 'type_match_handler' should be used instead |
86 | 86 | ''' |
87 | | if filename.find('.') > 0: |
| 87 | if os.path.basename(filename).find('.') > 0: |
88 | 88 | # Get the file extension |
89 | 89 | ext = os.path.splitext(filename)[1].lower() |
90 | 90 | |
… |
… |
def type_match_handler(media_file, filename):
|
106 | 106 | specifically. After that, if media type is one of supported ones, check the |
107 | 107 | contents of the file |
108 | 108 | ''' |
109 | | if filename.find('.') > 0: |
| 109 | if os.path.basename(filename).find('.') > 0: |
110 | 110 | # Get the file extension |
111 | 111 | ext = os.path.splitext(filename)[1].lower() |
112 | 112 | |