diff --git a/beets/util/__init__.py b/beets/util/__init__.py index f6396f9da..01a0257b0 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -480,7 +480,7 @@ def unique_path(path): return path base, ext = os.path.splitext(path) - match = re.search(r'\.(\d)+$', base) + match = re.search(br'\.(\d)+$', base) if match: num = int(match.group(1)) base = base[:match.start()] @@ -488,7 +488,7 @@ def unique_path(path): num = 0 while True: num += 1 - new_path = '%s.%i%s' % (base, num, ext) + new_path = b'%s.%i%s' % (base, num, ext) if not os.path.exists(new_path): return new_path