From 0404ca884ca70cc3e313c76a95f4a874d60472fc 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 d36da6749..17b60e419 100644 --- a/src/buildstream/downloadablefilesource.py +++ b/src/buildstream/downloadablefilesource.py @@ -211,7 +211,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: