From c8b35296b131e182e836d9bb01efba0827bd1ebb Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Mon, 16 Jan 2023 19:49:32 +0100 Subject: [PATCH] downloadablefilesource: don't download files if they are already cached --- src/buildstream/downloadablefilesource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buildstream/downloadablefilesource.py b/src/buildstream/downloadablefilesource.py index 3c7e05763..c9cb450b5 100644 --- a/src/buildstream/downloadablefilesource.py +++ b/src/buildstream/downloadablefilesource.py @@ -221,7 +221,7 @@ def _ensure_mirror(self, activity_name: str): # We do not use etag in case what we have in cache is # not matching ref in order to be able to recover from # corrupted download. - if self.ref and not self.is_cached(): + if self.ref and self.is_cached(): # Do not re-download the file if the ETag matches. etag = self._get_etag(self.ref) else: