From 505ef7a44fbd9b308cafa1f27deb38204fa9c2f2 Mon Sep 17 00:00:00 2001 From: bubriks Date: Thu, 19 Dec 2024 15:25:42 +0200 Subject: [PATCH] use posixpath --- python/hsfs/storage_connector.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/hsfs/storage_connector.py b/python/hsfs/storage_connector.py index 07a1dd0a6..cba166738 100644 --- a/python/hsfs/storage_connector.py +++ b/python/hsfs/storage_connector.py @@ -22,6 +22,7 @@ import warnings from abc import ABC, abstractmethod from typing import Any, Dict, List, Optional, TypeVar, Union +import posixpath import humps import pandas as pd @@ -342,7 +343,7 @@ def iam_role(self) -> Optional[str]: @property def path(self) -> Optional[str]: """If the connector refers to a path (e.g. S3) - return the path of the connector""" - return os.path.join("s3://" + self._bucket, *os.path.split(self._path if self._path else "")) + return posixpath.join("s3://" + self._bucket, *os.path.split(self._path if self._path else "")) @property def arguments(self) -> Optional[Dict[str, Any]]: @@ -435,7 +436,7 @@ def read( ) def _get_path(self, sub_path: str) -> str: - return os.path.join(self.path, *os.path.split(sub_path)) + return posixpath.join(self.path, *os.path.split(sub_path)) class RedshiftConnector(StorageConnector):