pyxdg/SOURCES/pyxdg-0.25-find-first-mimetype-match.patch
2021-10-08 16:13:31 +00:00

14 lines
651 B
Diff

diff -up pyxdg-0.25/xdg/Mime.py.BAD pyxdg-0.25/xdg/Mime.py
--- pyxdg-0.25/xdg/Mime.py.BAD 2013-03-05 10:19:10.750845664 -0500
+++ pyxdg-0.25/xdg/Mime.py 2013-03-05 10:19:14.771845520 -0500
@@ -360,7 +360,8 @@ def _cache_database():
if pattern.startswith('*.'):
rest = pattern[2:]
if not ('*' in rest or '[' in rest or '?' in rest):
- exts[rest] = mtype
+ if rest not in exts:
+ exts[rest] = mtype
continue
if '*' in pattern or '[' in pattern or '?' in pattern:
globs.append((pattern, mtype))