From 593ffef9fc1818edb06cd1949551852ba7b043c8 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Wed, 11 Sep 2024 14:21:08 +0100 Subject: [PATCH] bugfix: don't overwrite the cached container --- nf_core/pipelines/download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipelines/download.py b/nf_core/pipelines/download.py index 8d9f435e23..93fc8c980c 100644 --- a/nf_core/pipelines/download.py +++ b/nf_core/pipelines/download.py @@ -1311,7 +1311,7 @@ def singularity_copy_library_image( ) -> None: """Copy Singularity image from NXF_SINGULARITY_LIBRARYDIR to target folder, and possibly NXF_SINGULARITY_CACHEDIR.""" self.singularity_copy_image(container, library_path, out_path) - if cache_path: + if cache_path and not os.path.exists(cache_path): self.singularity_copy_image(container, library_path, cache_path) def singularity_copy_image(self, container: str, from_path: str, to_path: str) -> None: