Really only warn about CASENAME.[0-9]+.[A-Z]+.

Previously we did warn about files not starting with CASENAME.
This commit is contained in:
Markus Blatt 2018-09-05 16:03:51 +02:00
parent 07bc4396ab
commit 5aab0dfb7b

View File

@ -50,7 +50,8 @@ public:
ParallelFileMerger(const fs::path& output_dir,
const std::string& deckname)
: debugFileRegex_(deckname+"\\.\\d+\\.DBG"),
logFileRegex_(deckname+"\\.\\d+\\.PRT")
logFileRegex_(deckname+"\\.\\d+\\.PRT"),
fileWarningRegex_(deckname+"\\.(\\d+)\\.[^.]+")
{
auto debugPath = output_dir;
debugPath /= (deckname + ".DBG");
@ -68,7 +69,7 @@ public:
boost::smatch matches;
std::string filename = file.filename().native();
if ( boost::regex_match(filename, matches, regex) )
if ( boost::regex_match(filename, matches, fileWarningRegex_) )
{
std::string rank = boost::regex_replace(filename, regex, "\\1");
@ -123,6 +124,8 @@ private:
boost::regex debugFileRegex_;
/// \brief Regex to capture *.PRT
boost::regex logFileRegex_;
/// \brief Regex to capture CASENAME.[0-9]+.[A-Z]+
boost::regex fileWarningRegex_;
/// \brief Stream to *.DBG file
std::unique_ptr<fs::ofstream> debugStream_;
/// \brief Stream to *.PRT file