From 3a4287914a24cb3fcf042d9ff53a4d2c15fe7329 Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Thu, 26 Nov 2026 17:51:34 +0100 Subject: [PATCH] Return an error from o2-ccdb-downloadccdbfile when a download fails The success flag was combined with |= starting from true, so the tool always returned 0. It is now combined with &=, so the tool returns 1 if any requested path could not be downloaded. Co-Authored-By: Claude Opus 5.5 --- CCDB/src/DownloadCCDBFile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CCDB/src/DownloadCCDBFile.cxx b/CCDB/src/DownloadCCDBFile.cxx index 2876e95257989..6727ffb681fe2 100644 --- a/CCDB/src/DownloadCCDBFile.cxx +++ b/CCDB/src/DownloadCCDBFile.cxx @@ -86,7 +86,7 @@ int main(int argc, char* argv[]) bool success = true; for (auto& p : paths) { // could even multi-thread this - success |= api.retrieveBlob(p, dest, filter, timestamp, no_preserve_path, filename, std::to_string(notAfter), std::to_string(notBefore)); + success &= api.retrieveBlob(p, dest, filter, timestamp, no_preserve_path, filename, std::to_string(notAfter), std::to_string(notBefore)); } return success ? 0 : 1; }