Skip to content

Commit

Permalink
download fixies
Browse files Browse the repository at this point in the history
Signed-off-by: Ayush Kamat <ayush@latch.bio>
  • Loading branch information
ayushkamat committed Oct 10, 2024
1 parent 063e787 commit 158e130
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions latch_cli/services/cp/download/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ def download(

try:
res.parent.mkdir(exist_ok=True, parents=True)
if res.is_dir():
click.echo(
f"Cannot write file to {work_dest / rel} - directory"
" exists."
)
continue

work_queue.put_nowait(Work(url, work_dest / rel, chunk_size_mib))
except (NotADirectoryError, FileExistsError):
click.echo(
Expand Down

0 comments on commit 158e130

Please sign in to comment.