fix globbing issue where first mimetype is ignored for later matches
This commit is contained in:
parent
e89f0bf41e
commit
08e69739fa
|
@ -0,0 +1,13 @@
|
||||||
|
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))
|
|
@ -12,6 +12,8 @@ Group: Development/Libraries
|
||||||
License: LGPLv2
|
License: LGPLv2
|
||||||
URL: http://freedesktop.org/Software/pyxdg
|
URL: http://freedesktop.org/Software/pyxdg
|
||||||
Source0: http://people.freedesktop.org/~takluyver/%{name}-%{version}.tar.gz
|
Source0: http://people.freedesktop.org/~takluyver/%{name}-%{version}.tar.gz
|
||||||
|
# https://bugs.freedesktop.org/show_bug.cgi?id=61817
|
||||||
|
Patch0: pyxdg-0.25-find-first-mimetype-match.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# These are needed for the nose tests.
|
# These are needed for the nose tests.
|
||||||
BuildRequires: python-nose, hicolor-icon-theme
|
BuildRequires: python-nose, hicolor-icon-theme
|
||||||
|
@ -35,6 +37,7 @@ package contains a Python 3 version of PyXDG.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1 -b .pngfix
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
|
|
Loading…
Reference in New Issue