From cb4a26289efc65da7dc619bcc157b2289d5254ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 26 Aug 2021 08:13:02 +0200 Subject: [PATCH] Fix a bug in utils : bad management of mandatory files --- utils/acsmdownloader.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/utils/acsmdownloader.cpp b/utils/acsmdownloader.cpp index c6e6ff3..9c915fc 100644 --- a/utils/acsmdownloader.cpp +++ b/utils/acsmdownloader.cpp @@ -272,17 +272,23 @@ int main(int argc, char** argv) ACSMDownloader downloader(&app); int i; + bool hasErrors = false; + const char* orig; for (i=0; i<(int)ARRAY_SIZE(files); i++) { + orig = *files[i]; *files[i] = findFile(*files[i]); if (!*files[i]) { - std::cout << "Error : " << *files[i] << " doesn't exists" << std::endl; + std::cout << "Error : " << orig << " doesn't exists, did you activate your device ?" << std::endl; ret = -1; - goto end; + hasErrors = true; } } + if (hasErrors) + goto end; + if (exportPrivateKey) { if (acsmFile)