aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Bobrov <breton@cynicmansion.ru>2015-03-20 02:25:10 +0300
committerChristopher Allan Webber <cwebber@dustycloud.org>2015-04-22 17:20:31 -0500
commit364253857bd38e6d80df76b7041a1f05d34bce9c (patch)
tree6c352dd034830690bbec4c08adf93c30e3bde697
parentdcd8c8348a39dbe1c1e73f94517ceff4e012f531 (diff)
downloadmediagoblin-364253857bd38e6d80df76b7041a1f05d34bce9c.tar.lz
mediagoblin-364253857bd38e6d80df76b7041a1f05d34bce9c.tar.xz
mediagoblin-364253857bd38e6d80df76b7041a1f05d34bce9c.zip
fixed 5068
-rw-r--r--mediagoblin/media_types/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/media_types/__init__.py b/mediagoblin/media_types/__init__.py
index 3eeead86..97e4facd 100644
--- a/mediagoblin/media_types/__init__.py
+++ b/mediagoblin/media_types/__init__.py
@@ -84,7 +84,7 @@ def get_media_type_and_manager(filename):
This hook is deprecated, 'type_match_handler' should be used instead
'''
- if filename.find('.') > 0:
+ if os.path.basename(filename).find('.') > 0:
# Get the file extension
ext = os.path.splitext(filename)[1].lower()
@@ -106,7 +106,7 @@ def type_match_handler(media_file, filename):
specifically. After that, if media type is one of supported ones, check the
contents of the file
'''
- if filename.find('.') > 0:
+ if os.path.basename(filename).find('.') > 0:
# Get the file extension
ext = os.path.splitext(filename)[1].lower()