From 9052854e5024f85e2bfe0ae6d972e2a5a4b39b59 Mon Sep 17 00:00:00 2001 From: wisp3rwind <17089248+wisp3rwind@users.noreply.github.com> Date: Sat, 24 Dec 2022 18:19:06 +0100 Subject: [PATCH] library/PathQuery: remove useless bytestring_path() normpath already applies bytestring_path() to its output --- beets/library.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beets/library.py b/beets/library.py index b9344fe89..c3b11113c 100644 --- a/beets/library.py +++ b/beets/library.py @@ -67,7 +67,7 @@ class PathQuery(dbcore.FieldQuery): # By default, the case sensitivity depends on the filesystem # that the query path is located on. if case_sensitive is None: - path = util.bytestring_path(util.normpath(pattern)) + path = util.normpath(pattern) case_sensitive = beets.util.case_sensitive(path) self.case_sensitive = case_sensitive @@ -76,9 +76,9 @@ class PathQuery(dbcore.FieldQuery): pattern = pattern.lower() # Match the path as a single file. - self.file_path = util.bytestring_path(util.normpath(pattern)) + self.file_path = util.normpath(pattern) # As a directory (prefix). - self.dir_path = util.bytestring_path(os.path.join(self.file_path, b'')) + self.dir_path = os.path.join(self.file_path, b'') @classmethod def is_path_query(cls, query_part):