Skip to content

Commit

Permalink
use posixpath
Browse files Browse the repository at this point in the history
  • Loading branch information
bubriks committed Dec 19, 2024
1 parent 6e9b868 commit 505ef7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/hsfs/storage_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]]:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 505ef7a

Please sign in to comment.