Skip to content

Commit

Permalink
MMVII: Fix MPatFile and RunMultiSet when only 1 file match pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
meynardc committed Nov 13, 2024
1 parent 7555744 commit b08ea76
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MMVII/src/Appli/cMMVII_Appli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,11 @@ void cMMVII_Appli::InitParam(cGenArgsSpecContext *aArgsSpecs)
{
MMVII_UserError(eTyUEr::eEmptyPattern,"Specified set of files was empty");
}
} else if (mVMainSets.at(aNum).size() == 1){
// If only 1 file matches the pattern, we replace the pattern in this arg by the matched file
// If RunMultiSet is called, the Appli can use this arg name to retrieve the file
// (if not doing this, arg will be the pattern (i.e ".*.tif") and the appli will fail to open that)
aVSpec.at(aK)->InitParam(UniqueStr(aNum));
}
// StdOut() << "cAaaaPPlii " << __LINE__ << ToVect(mVMainSets.at(aNum)) << "\n";
}
Expand Down

0 comments on commit b08ea76

Please sign in to comment.