Skip to content

Commit 3c8823d

Browse files
committed
Run case sensitivity check (#1586) on bytestring
This should avoid problems when querying for Unicode paths.
1 parent d29cc7b commit 3c8823d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

beets/library.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def __init__(self, field, pattern, fast=True, case_sensitive=None):
6464
# By default, the case sensitivity depends on the filesystem
6565
# that the query path is located on.
6666
if case_sensitive is None:
67-
case_sensitive = beets.util.case_sensitive(pattern)
67+
path = util.bytestring_path(util.normpath(pattern))
68+
case_sensitive = beets.util.case_sensitive(path)
6869
self.case_sensitive = case_sensitive
6970

7071
# Use a normalized-case pattern for case-insensitive matches.

0 commit comments

Comments
 (0)