From d644f73f4a5eb6e1900e5a2df11168f8a7201f96 Mon Sep 17 00:00:00 2001 From: Neil Horne <15316949+elecpower@users.noreply.github.com> Date: Thu, 13 Feb 2025 11:31:10 +1100 Subject: [PATCH] fix(cpn): read and delete model file names case insensitive (#5903) --- companion/src/storage/labeled.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/companion/src/storage/labeled.cpp b/companion/src/storage/labeled.cpp index 235922dc9..5469c9cfd 100644 --- a/companion/src/storage/labeled.cpp +++ b/companion/src/storage/labeled.cpp @@ -102,7 +102,7 @@ bool LabelsStorageFormat::load(RadioData & radioData) if (!getFileList(filelist)) return false; - const std::regex yml_regex("MODELS/(model([0-9]+)\\.yml)"); + const std::regex yml_regex("MODELS/(model([0-9]+)\\.yml)", std::regex_constants::icase); for(const auto& f : filelist) { std::smatch match; @@ -203,7 +203,7 @@ bool LabelsStorageFormat::write(const RadioData & radioData) } // Delete all old modelxx.yml from radio MODELS folder before writing new modelxx.yml files - const std::regex yml_regex("MODELS/(model([0-9s]+)\\.yml)"); + const std::regex yml_regex("MODELS/(model([0-9s]+)\\.yml)", std::regex_constants::icase); for (const auto& f : filelist) { std::smatch match; if (std::regex_match(f, match, yml_regex)) {