From 2fc0fd219a199a56fb83cda7033dfcd91b52f53e Mon Sep 17 00:00:00 2001 From: Neil Horne <15316949+elecpower@users.noreply.github.com> Date: Tue, 18 Aug 2026 18:29:25 +1000 Subject: [PATCH] fix(cpn): treat missing image files as warnings (#7669) --- companion/src/storage/etx.cpp | 8 +++++--- companion/src/storage/sdcard.cpp | 11 +++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/companion/src/storage/etx.cpp b/companion/src/storage/etx.cpp index 55904b1e8..b03c7c44d 100644 --- a/companion/src/storage/etx.cpp +++ b/companion/src/storage/etx.cpp @@ -174,11 +174,13 @@ bool EtxFormat::writeImageFile(const QString & filename) } statusMsg(tr("File written: %1").arg(filename)); - return true; + } else { + // the non-existence of a Companion accessible image file is not fatal + // it may exist on the radio - so continue + statusMsg(tr("Unable to find and write image file: %1").arg(filename), QtWarningMsg); } - fatalMsg(tr("No application image cache")); - return false; + return true; } bool EtxFormat::getFileList(std::list& filelist) diff --git a/companion/src/storage/sdcard.cpp b/companion/src/storage/sdcard.cpp index ac3209376..98a408068 100644 --- a/companion/src/storage/sdcard.cpp +++ b/companion/src/storage/sdcard.cpp @@ -86,7 +86,8 @@ bool SdcardFormat::loadImageFile(const QString & filename, bool optional) return false; } } else { - fatalMsg(tr("No application image cache")); + // this should not occur + fatalMsg(tr("Application image cache directory not found")); return false; } @@ -143,11 +144,13 @@ bool SdcardFormat::writeImageFile(const QString & filename) } statusMsg(tr("Image written: %1").arg(filename)); - return true; + } else { + // the non-existence of a Companion accessible image file is not fatal + // it may exist on the radio - so continue + statusMsg(tr("Unable to find and write image file: %1").arg(filename), QtWarningMsg); } - fatalMsg(tr("No application image cache")); - return false; + return true; } bool SdcardFormat::getFileList(std::list& filelist)