Skip to content

Commit

Permalink
Merge pull request #139 from Bomme/macca_pathlike
Browse files Browse the repository at this point in the history
add support for os.PathLike filenames in macca.py
  • Loading branch information
sampsyo authored Dec 2, 2023
2 parents 724b884 + 1342a6a commit 2c8e364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion audioread/macca.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ def __del__(self):

class CFURL(CFObject):
def __init__(self, filename):
filename = os.path.abspath(os.path.expanduser(filename))
if not isinstance(filename, bytes):
filename = filename.encode(sys.getfilesystemencoding())
filename = os.path.abspath(os.path.expanduser(filename))
url = _corefoundation.CFURLCreateFromFileSystemRepresentation(
0, filename, len(filename), False
)
Expand Down

0 comments on commit 2c8e364

Please sign in to comment.