From e0962d02c2bfa51c9cf3340cb6c8bc4ed52f9b38 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 cc8b6173c..aa27b9697 100644 --- a/nf_core/pipelines/download.py +++ b/nf_core/pipelines/download.py @@ -1309,7 +1309,7 @@ def singularity_copy_cache_image(self, container: str, out_path: str, cache_path def singularity_copy_library_image(self, container: str, library_path: str, out_path: str, cache_path: Optional[str]) -> 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: