pyxdg/pyxdg-0.25-find-first-mimetype-match.patch
Troy Dawson 15ac89cb89 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/pyxdg#c8ffcaf2afb93a40bd3b7cb60df763dcc3210c13
2020-10-14 20:59:28 -07: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))