Skip to content

Commit

Permalink
changes to paths
Browse files Browse the repository at this point in the history
  • Loading branch information
bubriks committed Dec 19, 2024
1 parent 836506a commit 6e9b868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/hsfs/storage_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,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 "s3://" + self._bucket + ("/" + self._path if self._path else "")
return os.path.join("s3://" + self._bucket, *os.path.split(self._path if self._path else ""))

@property
def arguments(self) -> Optional[Dict[str, Any]]:
Expand Down Expand Up @@ -435,7 +435,7 @@ def read(
)

def _get_path(self, sub_path: str) -> str:
return os.path.join(self.path, sub_path)
return os.path.join(self.path, *os.path.split(sub_path))


class RedshiftConnector(StorageConnector):
Expand Down

0 comments on commit 6e9b868

Please sign in to comment.