Skip to content

Bulk asynchronous downloader for multiple file hosts

Try touching file before ab

Jules-WinnfieldXfb5678486271
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index ffe704455..b88da56f3 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "5.0.108"
+__version__ = "5.0.109"
diff --git a/cyberdrop_dl/clients/download_client.py b/cyberdrop_dl/clients/download_client.py
index 21c7c6db4..612b16d43 100644
--- a/cyberdrop_dl/clients/download_client.py
+++ b/cyberdrop_dl/clients/download_client.py
@@ -95,6 +95,8 @@ class DownloadClient:
update_progress: partial) -> None:
"""Appends content to a file"""
file.parent.mkdir(parents=True, exist_ok=True)
+ if not file.is_file():
+ file.touch()
async with aiofiles.open(file, mode='ab') as f:
async for chunk, _ in content.iter_chunks():
await asyncio.sleep(0)
diff --git a/pyproject.toml b/pyproject.toml
index 383c3d79a..63874d2b1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
-version = "5.0.108"
+version = "5.0.109"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"