Skip to content

Commit

Permalink
Fixed path join for s3
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedamen committed Jan 20, 2022
1 parent 4bc5d3f commit 25a84df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ individual data providers)

# Coding log

* 20 Jan 2022
* Fixed path join for s3
* 17 Jan 2022
* Fixed bug in BBG wrapper
* 16 Jan 2022
Expand Down
9 changes: 7 additions & 2 deletions findatapy/market/ioengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,17 +1313,22 @@ def path_exists(self, path, cloud_credentials=None):
def path_join(self, folder, *file):

file = list(file)

if file[0][0] == '/':
file[0] = file[0][1::]

if 's3://' in folder:

folder = folder.replace("s3://", "")
folder = os.path.join(folder, *file)

folder = folder.replace("//", "/")
folder = folder.replace("\\\\", "/")
folder = folder.replace("\\", "/")

folder = "s3://" + folder

else:
if file[0][0] == '/':
file[0] = file[0][1::]

folder = os.path.join(folder, *file)

Expand Down

0 comments on commit 25a84df

Please sign in to comment.