Skip to content

Commit

Permalink
handle posixpath object parsing for hsds and s3 filepaths
Browse files Browse the repository at this point in the history
  • Loading branch information
grantbuster committed Dec 20, 2024
1 parent 984befd commit 1c11653
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rex/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ def is_hsds_file(file_path):
"""
if isinstance(file_path, (list, tuple)):
file_path = file_path[0]
return file_path.startswith('/nrel/')
return str(file_path).startswith('/nrel/')

@staticmethod
def is_s3_file(file_path):
Expand All @@ -1218,7 +1218,7 @@ def is_s3_file(file_path):
"""
if isinstance(file_path, (list, tuple)):
file_path = file_path[0]
return file_path.startswith('s3://')
return str(file_path).startswith('s3://')

def get_attrs(self, dset=None):
"""
Expand Down

0 comments on commit 1c11653

Please sign in to comment.