3
3
#include " errorhandler.h"
4
4
5
5
6
- verifyFile::verifyFile (datafactory *dfverifiers,errorHandler *hError,std::string &pathdirectory,std::string TYPE)
6
+ verifyFile::verifyFile (datafactory *dfverifiers,errorHandler *hError,std::string &pathdirectory,std::string TYPE, bool skipNamingTest )
7
7
{
8
8
File_Group *fg = dfverifiers->get <File_Group>(TYPE.c_str ());
9
9
if ( fg != NULL ) {
@@ -16,12 +16,14 @@ verifyFile::verifyFile(datafactory *dfverifiers,errorHandler *hError,std::string
16
16
// 1. get GROUPID
17
17
// 2. find image with same GROUPID
18
18
// 3. get the SEQ value from that image
19
- if (atoi (fname.substr (fname.length () - 9 , 5 ).c_str ()) != tf.seq )
20
- {
21
- char tmp[20 ];
22
- sprintf_s (tmp, " %05d" , tf.seq );
23
- hError->getError (cat_sequenceIncorrect," METS" ," FILESEC" ,tf.ref +" should end in " + std::string (tmp)/* +" "+fname*/ ,fname,tf.ref );
24
- // std::cout<<"DEBUG"<<fname.substr(fname.length() - 9, 5)<<std::endl;
19
+ if (skipNamingTest){
20
+ if (atoi (fname.substr (fname.length () - 9 , 5 ).c_str ()) != tf.seq )
21
+ {
22
+ char tmp[20 ];
23
+ sprintf_s (tmp, " %05d" , tf.seq );
24
+ hError->getError (cat_sequenceIncorrect," METS" ," FILESEC" ,tf.ref +" should end in " + std::string (tmp)/* +" "+fname*/ ,fname,tf.ref );
25
+ // std::cout<<"DEBUG"<<fname.substr(fname.length() - 9, 5)<<std::endl;
26
+ }
25
27
}
26
28
FILE *fp ;
27
29
fopen_s (&fp,fname.c_str (), " r" );
0 commit comments