Skip to content

Commit

Permalink
Changed local.split("/")[-1] to os.path.basename(local) for compati…
Browse files Browse the repository at this point in the history
…bility with all OS including Windows.
  • Loading branch information
Lachlan Cahill committed Nov 18, 2023
1 parent 71d7a87 commit a6ab717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindings/python/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def convert_multi(
local_filenames.append(index)

operations = [
CommitOperationAdd(path_in_repo=local.split("/")[-1], path_or_fileobj=local) for local in local_filenames
CommitOperationAdd(path_in_repo=os.path.basename(local), path_or_fileobj=local) for local in local_filenames
]
errors: List[Tuple[str, "Exception"]] = []

Expand Down

0 comments on commit a6ab717

Please sign in to comment.