From 021e30ffde48eb04c31056e939f8ce61f09c99a3 Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Mon, 1 Apr 2019 14:45:45 -0400 Subject: [PATCH] fix: extension check disregard the first period, otherwise the `filename.` test fails. --- lbrynet/schema/mime_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbrynet/schema/mime_types.py b/lbrynet/schema/mime_types.py index be2694149..201219233 100644 --- a/lbrynet/schema/mime_types.py +++ b/lbrynet/schema/mime_types.py @@ -160,7 +160,7 @@ types_map = { def guess_media_type(path): _, ext = os.path.splitext(path) extension = ext.strip().lower() - if extension: + if extension[1:]: if extension in types_map: return types_map[extension][0] return f'application/x-ext-{extension[1:]}'