mirror of
https://github.com/beetbox/beets.git
synced 2026-01-02 14:03:12 +01:00
Merge pull request #471 from kljohann/matchquery_path
fix MatchQuery('path', ...) for unicode value
This commit is contained in:
commit
69e6ef7633
1 changed files with 4 additions and 1 deletions
|
|
@ -1026,7 +1026,10 @@ class MatchQuery(FieldQuery):
|
|||
"""A query that looks for exact matches in an item field."""
|
||||
def col_clause(self):
|
||||
pattern = self.pattern
|
||||
if self.field == 'path' and isinstance(pattern, str):
|
||||
if self.field == 'path':
|
||||
if isinstance(pattern, unicode):
|
||||
pattern = bytestring_path(pattern)
|
||||
if isinstance(pattern, str):
|
||||
pattern = buffer(pattern)
|
||||
return self.field + " = ?", [pattern]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue