|
|
@ -26,11 +26,24 @@ Payloadmanifest::Payloadmanifest( string basedir ) { |
|
|
|
// cout << "is file: "<< fs::is_regular_file( s) << endl;
|
|
|
|
if (fs::is_regular_file( s)) { |
|
|
|
Payloadmanifest::manifest_algorithm_files[it->first] = filename; |
|
|
|
// debug
|
|
|
|
cout << "PAYLOADMANIFEST: alg="<< it->first << " => filename=" << it->second << endl; |
|
|
|
cout << " alg="<< it->first << " => filename=" << Payloadmanifest::manifest_algorithm_files[it->first] << endl; |
|
|
|
// debug
|
|
|
|
cout << "PAYLOADMANIFEST: alg="<< it->first << " => filename=" << it->second << endl; |
|
|
|
// cout << " alg="<< it->first << " => filename=" << Payloadmanifest::manifest_algorithm_files[it->first] << endl;
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
bool Payloadmanifest::validate( list<string> & log ) { |
|
|
|
bool is_valid = true; |
|
|
|
bool tmp = Manifest::validate( log ); |
|
|
|
if (false == tmp) { is_valid = false; } |
|
|
|
// check if at least one payload file exist
|
|
|
|
cout << "payload_manifest: " << this->manifest_algorithm_files.size() << endl; |
|
|
|
if (0 == this->manifest_algorithm_files.size()) { |
|
|
|
log.push_back("Bagit payloadmanifest count greater zero expected, but " + to_string(this->manifest_algorithm_files.size()) + " found"); |
|
|
|
is_valid = false; |
|
|
|
} |
|
|
|
return is_valid; |
|
|
|
} |
|
|
|
|
|
|
|
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
|