From 6411924cf2ae5bc0093367a608a6f496b60c322f Mon Sep 17 00:00:00 2001 From: kroka Date: Fri, 22 May 2020 14:33:24 +0200 Subject: [PATCH] force download if deletion is enabled ignore that file might exist already, change motivated by #213 --- rhasspy/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rhasspy/core.py b/rhasspy/core.py index b99b801..8595e9f 100755 --- a/rhasspy/core.py +++ b/rhasspy/core.py @@ -584,7 +584,7 @@ async def download_file(url, filename): src_path = dest_path # Check if file is already in cache - if os.path.exists(src_path) and (os.path.getsize(src_path) > 0): + if not delete and os.path.exists(src_path) and (os.path.getsize(src_path) > 0): self._logger.debug( "Using cached %s for %s", src_path, dest_name )