Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
fix: async get size (#1486)
NTFSvolume68aa898f50da
diff --git a/cyberdrop_dl/utils/aio.py b/cyberdrop_dl/utils/aio.pyindex ca37321f0..5ee01cde7 100644--- a/cyberdrop_dl/utils/aio.py+++ b/cyberdrop_dl/utils/aio.py@@ -4,11 +4,11 @@ from __future__ import annotationsimport asyncioimport builtins-import pathlibfrom stat import S_ISREGfrom typing import TYPE_CHECKING, ParamSpec, TypeVar, castif TYPE_CHECKING:+ import pathlibfrom collections.abc import Awaitable, Sequence_P = ParamSpec("_P")@@ -70,11 +70,7 @@ async def get_size(path: pathlib.Path) -> int | None:try:stat_result = await stat(path)- except OSError as e:- if not pathlib._ignore_error(e): # type: ignore[reportAttributeAccessIssue]- raise- return- except ValueError:+ except (OSError, ValueError):returnelse:if S_ISREG(stat_result.st_mode):