From 819f03f0e046bbad14d911bafa054a204101b41a Mon Sep 17 00:00:00 2001 From: MartyLake Date: Wed, 24 Jul 2019 10:11:32 +0200 Subject: [PATCH] Add special case for string --- beets/util/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/beets/util/__init__.py b/beets/util/__init__.py index bb84aedc7..cc23b6874 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -227,6 +227,8 @@ 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'/')