From a6ab717c63ef0448a4169b393eeb1998bdd0184f Mon Sep 17 00:00:00 2001 From: Lachlan Cahill Date: Sun, 19 Nov 2023 11:45:28 +1300 Subject: [PATCH] Changed `local.split("/")[-1]` to os.path.basename(local) for compatibility with all OS including Windows. --- bindings/python/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/convert.py b/bindings/python/convert.py index eaca956a..421ae4dc 100644 --- a/bindings/python/convert.py +++ b/bindings/python/convert.py @@ -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"]] = []