fixed bug to download file if skip flag is present.

This commit is contained in:
Yoshihiro OKUMURA 2025-05-20 17:50:11 +09:00
parent 7b3f1f2d09
commit 893bc77128
Signed by: orrisroot
GPG Key ID: 470AA444C92904B2

View File

@ -141,7 +141,7 @@ class DownloadCommand(BaseCommand):
@classmethod
def __multiple_download_worker(cls, file_api: FilesApi, info: DownloadFileInfo, is_skip_if_exists: bool) -> bool:
if not is_skip_if_exists or os.path.exists(info.path) and info.file.size != os.path.getsize(info.path):
if not is_skip_if_exists or not os.path.exists(info.path) or info.file.size != os.path.getsize(info.path):
try:
file_api.download(info.file, info.path)
except Exception: