Differences From:
File
src/zip.c
part of check-in
[6dab6149b1]
- From the vinfo webpage, provide a hyperlink to download a ZIP archive
the version.
by
drh on
2007-08-01 13:32:11.
[view]
To:
File
src/zip.c
part of check-in
[95e17f4e3f]
- Generate the "manifest.uuid" file containing the SHA1 hash of the "manifest"
file whenever the manifest is generated. Makefiles can used the
"manifest.uuid" to insert the version number into the executable.
by
drh on
2007-08-25 19:31:31.
[view]
@@ -268,9 +268,9 @@
** pZip is zeroed.
*/
void zip_of_baseline(int rid, Blob *pZip){
int i;
- Blob mfile, file;
+ Blob mfile, file, hash;
Manifest m;
content_get(rid, &mfile);
if( blob_size(&mfile)==0 ){
@@ -277,14 +277,19 @@
blob_zero(pZip);
return;
}
blob_zero(&file);
+ blob_zero(&hash);
blob_copy(&file, &mfile);
zip_open();
if( manifest_parse(&m, &mfile) ){
zip_set_timedate(m.rDate);
zip_add_file("manifest", &file);
+ sha1sum_blob(&file, &hash);
blob_reset(&file);
+ blob_append(&hash, "\n", 1);
+ zip_add_file("manifest.uuid", &hash);
+ blob_reset(&hash);
for(i=0; i<m.nFile; i++){
int fid = uuid_to_rid(m.aFile[i].zUuid, 0);
if( fid ){
content_get(fid, &file);