Skip to content

Commit

Permalink
fix(cpn): read and delete model file names case insensitive (#5903)
Browse files Browse the repository at this point in the history
  • Loading branch information
elecpower authored Feb 13, 2025
1 parent 0458cc8 commit d644f73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions companion/src/storage/labeled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit d644f73

Please sign in to comment.