Skip to content

Commit

Permalink
Create dest dir for direct access before download
Browse files Browse the repository at this point in the history
Fixes nsidc#562
  • Loading branch information
chuckwondo committed May 13, 2024
1 parent 5e45cc0 commit 5ecd07f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions earthaccess/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,9 @@ def _get_granules(
else:
print(f"Accessing cloud dataset using provider: {provider}")
s3_fs = self.get_s3fs_session(provider=provider)

local_path.mkdir(parents=True, exist_ok=True)

# TODO: make this async
for file in data_links:
s3_fs.get(file, str(local_path))
Expand Down

0 comments on commit 5ecd07f

Please sign in to comment.