From f29403ba9c80e226ff1641e0f9f0575f5738311e Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 27 Aug 2022 16:09:25 -0500 Subject: [PATCH] fix: non-zero return for plugin success in dd4hep-1.22 As of DD4hep-1.22, https://github.com/AIDASoft/DD4hep/pull/936, any plugin returning a zero return value is assumed to have failed. This is somewhat counter-intuitive for plugins that simply return a long status code, but it is inteded to allow recursive calls and is in line with what other plugins already do, e.g. `return field` or `return sdet`. --- src/FileLoader.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/FileLoader.cpp b/src/FileLoader.cpp index cb3a45204..2012b20fc 100644 --- a/src/FileLoader.cpp +++ b/src/FileLoader.cpp @@ -54,16 +54,14 @@ long load_file(Detector& /* desc */, int argc, char** argv) // if file or url is empty, do nothing if (file.empty()) { printout(WARNING, "FileLoader", "no file specified"); - return 0; } if (url.empty()) { printout(WARNING, "FileLoader", "no url specified"); - return 0; } EnsureFileFromURLExists(url, file, cache, cmd); - return 0; + return 1; } #ifdef EPIC_ECCE_LEGACY_COMPAT