Skip to content

Commit

Permalink
upath: fix os.Pathlike support in get_upath_protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- committed Oct 12, 2023
1 parent e247c22 commit d3abe2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upath/core312plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_upath_protocol(
elif isinstance(pth, PurePath):
pth_protocol = ""
else:
raise TypeError(f"expected a str or PurePath instance, got: {pth!r}")
pth_protocol = split_upath_protocol(os.fspath(pth))
# if storage_options and not protocol:
# protocol = "file"
if protocol and pth_protocol and not pth_protocol.startswith(protocol):
Expand Down

0 comments on commit d3abe2b

Please sign in to comment.