diff --git a/beets/util/__init__.py b/beets/util/__init__.py index cc23b6874..bb84aedc7 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -227,8 +227,6 @@ def path_as_posix(path): """Return the string representation of the path with forward (/) slashes. """ - if isinstance(path, str): - return path.replace('\\', '/') return path.replace(b'\\', b'/') diff --git a/test/test_files.py b/test/test_files.py index 6a6fa3531..f31779672 100644 --- a/test/test_files.py +++ b/test/test_files.py @@ -196,8 +196,8 @@ class HelperTest(_common.TestCase): self.assertEqual(util.components(p), a) def test_forward_slash(self): - p = r'C:\a\b\c' - a = r'C:/a/b/c' + p = br'C:\a\b\c' + a = br'C:/a/b/c' self.assertEqual(util.path_as_posix(p), a)