|
|
@ -94,14 +94,16 @@ bool Manifest::store( string basedir, list<string>& files ) { |
|
|
|
checksum_algorithms alg = it->first; |
|
|
|
// test if file exists
|
|
|
|
string algfilename = basedir + it->second; |
|
|
|
cout << "DEBUG manifest::store, file='"<<algfilename << "' (newbase='" << basedir << "', filename='" << it->second << "'" <<endl; |
|
|
|
ofstream alg_txt_file; |
|
|
|
alg_txt_file.open( algfilename ); |
|
|
|
if (alg_txt_file.is_open()) { |
|
|
|
list<string>::iterator ch; |
|
|
|
for (ch=files.begin(); ch!=files.end(); ++ch) { |
|
|
|
string filename = *ch; |
|
|
|
string filename = basedir + *ch; |
|
|
|
cout << "\tfilename='"<<filename<<"'"<<endl; |
|
|
|
string checksum_string = checksum.checksum_of_file( filename, alg); |
|
|
|
alg_txt_file << checksum_string << " " << filename << endl; |
|
|
|
alg_txt_file << checksum_string << " " << *ch << endl; |
|
|
|
} |
|
|
|
alg_txt_file.close(); |
|
|
|
} |
|
|
|