Fossil SCM

added setting to change name of the manifest files in the checkout

wolfgang 2010-09-27 18:12 wolfgangFormat2CSS_2
Commit 9978d2aba603d94db4b204650aa161c921c06659
+2 -2
--- src/add.c
+++ src/add.c
@@ -36,20 +36,20 @@
3636
Blob pathname;
3737
const char *zPath;
3838
3939
file_tree_name(zName, &pathname, 1);
4040
zPath = blob_str(&pathname);
41
- if( strcmp(zPath, "manifest")==0
41
+ if( strcmp(zPath, db_manifestName())==0
4242
|| strcmp(zPath, "_FOSSIL_")==0
4343
|| strcmp(zPath, "_FOSSIL_-journal")==0
4444
|| strcmp(zPath, "_FOSSIL_-wal")==0
4545
|| strcmp(zPath, "_FOSSIL_-shm")==0
4646
|| strcmp(zPath, ".fos")==0
4747
|| strcmp(zPath, ".fos-journal")==0
4848
|| strcmp(zPath, ".fos-wal")==0
4949
|| strcmp(zPath, ".fos-shm")==0
50
- || strcmp(zPath, "manifest.uuid")==0
50
+ || strcmp(zPath, db_manifestUuidName())==0
5151
|| blob_compare(&pathname, pOmit)==0
5252
){
5353
fossil_warning("cannot add %s", zPath);
5454
}else{
5555
if( !file_is_simple_pathname(zPath) ){
5656
--- src/add.c
+++ src/add.c
@@ -36,20 +36,20 @@
36 Blob pathname;
37 const char *zPath;
38
39 file_tree_name(zName, &pathname, 1);
40 zPath = blob_str(&pathname);
41 if( strcmp(zPath, "manifest")==0
42 || strcmp(zPath, "_FOSSIL_")==0
43 || strcmp(zPath, "_FOSSIL_-journal")==0
44 || strcmp(zPath, "_FOSSIL_-wal")==0
45 || strcmp(zPath, "_FOSSIL_-shm")==0
46 || strcmp(zPath, ".fos")==0
47 || strcmp(zPath, ".fos-journal")==0
48 || strcmp(zPath, ".fos-wal")==0
49 || strcmp(zPath, ".fos-shm")==0
50 || strcmp(zPath, "manifest.uuid")==0
51 || blob_compare(&pathname, pOmit)==0
52 ){
53 fossil_warning("cannot add %s", zPath);
54 }else{
55 if( !file_is_simple_pathname(zPath) ){
56
--- src/add.c
+++ src/add.c
@@ -36,20 +36,20 @@
36 Blob pathname;
37 const char *zPath;
38
39 file_tree_name(zName, &pathname, 1);
40 zPath = blob_str(&pathname);
41 if( strcmp(zPath, db_manifestName())==0
42 || strcmp(zPath, "_FOSSIL_")==0
43 || strcmp(zPath, "_FOSSIL_-journal")==0
44 || strcmp(zPath, "_FOSSIL_-wal")==0
45 || strcmp(zPath, "_FOSSIL_-shm")==0
46 || strcmp(zPath, ".fos")==0
47 || strcmp(zPath, ".fos-journal")==0
48 || strcmp(zPath, ".fos-wal")==0
49 || strcmp(zPath, ".fos-shm")==0
50 || strcmp(zPath, db_manifestUuidName())==0
51 || blob_compare(&pathname, pOmit)==0
52 ){
53 fossil_warning("cannot add %s", zPath);
54 }else{
55 if( !file_is_simple_pathname(zPath) ){
56
+2 -2
--- src/checkin.c
+++ src/checkin.c
@@ -844,11 +844,11 @@
844844
db_finalize(&q);
845845
}
846846
blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
847847
md5sum_blob(&manifest, &mcksum);
848848
blob_appendf(&manifest, "Z %b\n", &mcksum);
849
- zManifestFile = mprintf("%smanifest", g.zLocalRoot);
849
+ zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
850850
if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){
851851
Blob ans;
852852
blob_zero(&ans);
853853
prompt_user("unable to sign manifest. continue (y/N)? ", &ans);
854854
if( blob_str(&ans)[0]!='y' ){
@@ -866,11 +866,11 @@
866866
db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
867867
manifest_crosslink(nvid, &manifest);
868868
content_deltify(vid, nvid, 0);
869869
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
870870
printf("New_Version: %s\n", zUuid);
871
- zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
871
+ zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestUuidName());
872872
blob_zero(&muuid);
873873
blob_appendf(&muuid, "%s\n", zUuid);
874874
blob_write_to_file(&muuid, zManifestFile);
875875
free(zManifestFile);
876876
blob_reset(&muuid);
877877
--- src/checkin.c
+++ src/checkin.c
@@ -844,11 +844,11 @@
844 db_finalize(&q);
845 }
846 blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
847 md5sum_blob(&manifest, &mcksum);
848 blob_appendf(&manifest, "Z %b\n", &mcksum);
849 zManifestFile = mprintf("%smanifest", g.zLocalRoot);
850 if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){
851 Blob ans;
852 blob_zero(&ans);
853 prompt_user("unable to sign manifest. continue (y/N)? ", &ans);
854 if( blob_str(&ans)[0]!='y' ){
@@ -866,11 +866,11 @@
866 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
867 manifest_crosslink(nvid, &manifest);
868 content_deltify(vid, nvid, 0);
869 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
870 printf("New_Version: %s\n", zUuid);
871 zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
872 blob_zero(&muuid);
873 blob_appendf(&muuid, "%s\n", zUuid);
874 blob_write_to_file(&muuid, zManifestFile);
875 free(zManifestFile);
876 blob_reset(&muuid);
877
--- src/checkin.c
+++ src/checkin.c
@@ -844,11 +844,11 @@
844 db_finalize(&q);
845 }
846 blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
847 md5sum_blob(&manifest, &mcksum);
848 blob_appendf(&manifest, "Z %b\n", &mcksum);
849 zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
850 if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){
851 Blob ans;
852 blob_zero(&ans);
853 prompt_user("unable to sign manifest. continue (y/N)? ", &ans);
854 if( blob_str(&ans)[0]!='y' ){
@@ -866,11 +866,11 @@
866 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
867 manifest_crosslink(nvid, &manifest);
868 content_deltify(vid, nvid, 0);
869 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
870 printf("New_Version: %s\n", zUuid);
871 zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestUuidName());
872 blob_zero(&muuid);
873 blob_appendf(&muuid, "%s\n", zUuid);
874 blob_write_to_file(&muuid, zManifestFile);
875 free(zManifestFile);
876 blob_reset(&muuid);
877
+2 -2
--- src/checkout.c
+++ src/checkout.c
@@ -110,17 +110,17 @@
110110
int baseLen;
111111
int i;
112112
Manifest m;
113113
114114
blob_zero(&manifest);
115
- zManFile = mprintf("%smanifest", g.zLocalRoot);
115
+ zManFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
116116
content_get(vid, &manifest);
117117
blob_write_to_file(&manifest, zManFile);
118118
free(zManFile);
119119
blob_zero(&hash);
120120
sha1sum_blob(&manifest, &hash);
121
- zManFile = mprintf("%smanifest.uuid", g.zLocalRoot);
121
+ zManFile = mprintf("%s%s", g.zLocalRoot,db_manifestUuidName());
122122
blob_append(&hash, "\n", 1);
123123
blob_write_to_file(&hash, zManFile);
124124
free(zManFile);
125125
blob_reset(&hash);
126126
manifest_parse(&m, &manifest);
127127
--- src/checkout.c
+++ src/checkout.c
@@ -110,17 +110,17 @@
110 int baseLen;
111 int i;
112 Manifest m;
113
114 blob_zero(&manifest);
115 zManFile = mprintf("%smanifest", g.zLocalRoot);
116 content_get(vid, &manifest);
117 blob_write_to_file(&manifest, zManFile);
118 free(zManFile);
119 blob_zero(&hash);
120 sha1sum_blob(&manifest, &hash);
121 zManFile = mprintf("%smanifest.uuid", g.zLocalRoot);
122 blob_append(&hash, "\n", 1);
123 blob_write_to_file(&hash, zManFile);
124 free(zManFile);
125 blob_reset(&hash);
126 manifest_parse(&m, &manifest);
127
--- src/checkout.c
+++ src/checkout.c
@@ -110,17 +110,17 @@
110 int baseLen;
111 int i;
112 Manifest m;
113
114 blob_zero(&manifest);
115 zManFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
116 content_get(vid, &manifest);
117 blob_write_to_file(&manifest, zManFile);
118 free(zManFile);
119 blob_zero(&hash);
120 sha1sum_blob(&manifest, &hash);
121 zManFile = mprintf("%s%s", g.zLocalRoot,db_manifestUuidName());
122 blob_append(&hash, "\n", 1);
123 blob_write_to_file(&hash, zManFile);
124 free(zManFile);
125 blob_reset(&hash);
126 manifest_parse(&m, &manifest);
127
+48
--- src/db.c
+++ src/db.c
@@ -48,10 +48,52 @@
4848
sqlite3_stmt *pStmt; /* The results of sqlite3_prepare() */
4949
Stmt *pNext, *pPrev; /* List of all unfinalized statements */
5050
int nStep; /* Number of sqlite3_step() calls */
5151
};
5252
#endif /* INTERFACE */
53
+
54
+/*
55
+** Get the configured name for the manifest file
56
+*/
57
+const char* db_manifestName(void){
58
+ static char zManifestFNDefault[] = "manifest";
59
+
60
+ if (!g.zManifestFN){
61
+ char *zManifestFNPara;
62
+
63
+ zManifestFNPara = db_get("manifest",zManifestFNDefault);
64
+ if (!zManifestFNPara || !*zManifestFNPara){
65
+ zManifestFNPara = zManifestFNDefault;
66
+ }
67
+ g.zManifestFN = mprintf("%s",db_get("manifest",zManifestFNPara));
68
+ }
69
+ return (g.zManifestFN);
70
+}
71
+
72
+/*
73
+** Get the configured name for the manifest.uuid file
74
+*/
75
+const char* db_manifestUuidName(void){
76
+ if (!g.zManifestUuidFN){
77
+ g.zManifestUuidFN = mprintf("%s.uuid",db_manifestName());
78
+ }
79
+ return (g.zManifestUuidFN);
80
+}
81
+
82
+/*
83
+** clear manifest filename caches
84
+*/
85
+void db_FreeManifestNames(void){
86
+ if (g.zManifestFN){
87
+ free(g.zManifestFN);
88
+ g.zManifestFN = 0;
89
+ }
90
+ if (g.zManifestUuidFN){
91
+ free(g.zManifestUuidFN);
92
+ g.zManifestUuidFN = 0;
93
+ }
94
+}
5395
5496
/*
5597
** Call this routine when a database error occurs.
5698
*/
5799
static void db_err(const char *zFormat, ...){
@@ -783,10 +825,12 @@
783825
while( n>1 && zPwd[n-1]=='/' ){
784826
n--;
785827
zPwd[n] = 0;
786828
}
787829
g.zLocalRoot = mprintf("%s/", zPwd);
830
+ g.zManifestFN = 0;
831
+ g.zManifestUuidFN = 0;
788832
return 1;
789833
}
790834
}
791835
n--;
792836
while( n>0 && zPwd[n]!='/' ){ n--; }
@@ -1522,10 +1566,11 @@
15221566
{ "editor", 0, 16, "" },
15231567
{ "gdiff-command", 0, 16, "gdiff" },
15241568
{ "ignore-glob", 0, 40, "" },
15251569
{ "http-port", 0, 16, "8080" },
15261570
{ "localauth", 0, 0, "0" },
1571
+ { "manifest", 0, 32, "" },
15271572
{ "mtime-changes", 0, 0, "0" },
15281573
{ "pgp-command", 0, 32, "gpg --clearsign -o " },
15291574
{ "proxy", 0, 32, "off" },
15301575
{ "ssh-command", 0, 32, "" },
15311576
{ "web-browser", 0, 32, "" },
@@ -1584,10 +1629,12 @@
15841629
**
15851630
** localauth If enabled, require that HTTP connections from
15861631
** 127.0.0.1 be authenticated by password. If
15871632
** false, all HTTP requests from localhost have
15881633
** unrestricted access to the repository.
1634
+**
1635
+** manifest name of manifest file, standard is manifest
15891636
**
15901637
** mtime-changes Use file modification times (mtimes) to detect when
15911638
** files have been modified. (Default "on".)
15921639
**
15931640
** pgp-command Command used to clear-sign manifests at check-in.
@@ -1639,6 +1686,7 @@
16391686
print_setting(ctrlSettings[i].name);
16401687
}
16411688
}else{
16421689
usage("?PROPERTY? ?VALUE?");
16431690
}
1691
+ db_FreeManifestNames();
16441692
}
16451693
--- src/db.c
+++ src/db.c
@@ -48,10 +48,52 @@
48 sqlite3_stmt *pStmt; /* The results of sqlite3_prepare() */
49 Stmt *pNext, *pPrev; /* List of all unfinalized statements */
50 int nStep; /* Number of sqlite3_step() calls */
51 };
52 #endif /* INTERFACE */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
54 /*
55 ** Call this routine when a database error occurs.
56 */
57 static void db_err(const char *zFormat, ...){
@@ -783,10 +825,12 @@
783 while( n>1 && zPwd[n-1]=='/' ){
784 n--;
785 zPwd[n] = 0;
786 }
787 g.zLocalRoot = mprintf("%s/", zPwd);
 
 
788 return 1;
789 }
790 }
791 n--;
792 while( n>0 && zPwd[n]!='/' ){ n--; }
@@ -1522,10 +1566,11 @@
1522 { "editor", 0, 16, "" },
1523 { "gdiff-command", 0, 16, "gdiff" },
1524 { "ignore-glob", 0, 40, "" },
1525 { "http-port", 0, 16, "8080" },
1526 { "localauth", 0, 0, "0" },
 
1527 { "mtime-changes", 0, 0, "0" },
1528 { "pgp-command", 0, 32, "gpg --clearsign -o " },
1529 { "proxy", 0, 32, "off" },
1530 { "ssh-command", 0, 32, "" },
1531 { "web-browser", 0, 32, "" },
@@ -1584,10 +1629,12 @@
1584 **
1585 ** localauth If enabled, require that HTTP connections from
1586 ** 127.0.0.1 be authenticated by password. If
1587 ** false, all HTTP requests from localhost have
1588 ** unrestricted access to the repository.
 
 
1589 **
1590 ** mtime-changes Use file modification times (mtimes) to detect when
1591 ** files have been modified. (Default "on".)
1592 **
1593 ** pgp-command Command used to clear-sign manifests at check-in.
@@ -1639,6 +1686,7 @@
1639 print_setting(ctrlSettings[i].name);
1640 }
1641 }else{
1642 usage("?PROPERTY? ?VALUE?");
1643 }
 
1644 }
1645
--- src/db.c
+++ src/db.c
@@ -48,10 +48,52 @@
48 sqlite3_stmt *pStmt; /* The results of sqlite3_prepare() */
49 Stmt *pNext, *pPrev; /* List of all unfinalized statements */
50 int nStep; /* Number of sqlite3_step() calls */
51 };
52 #endif /* INTERFACE */
53
54 /*
55 ** Get the configured name for the manifest file
56 */
57 const char* db_manifestName(void){
58 static char zManifestFNDefault[] = "manifest";
59
60 if (!g.zManifestFN){
61 char *zManifestFNPara;
62
63 zManifestFNPara = db_get("manifest",zManifestFNDefault);
64 if (!zManifestFNPara || !*zManifestFNPara){
65 zManifestFNPara = zManifestFNDefault;
66 }
67 g.zManifestFN = mprintf("%s",db_get("manifest",zManifestFNPara));
68 }
69 return (g.zManifestFN);
70 }
71
72 /*
73 ** Get the configured name for the manifest.uuid file
74 */
75 const char* db_manifestUuidName(void){
76 if (!g.zManifestUuidFN){
77 g.zManifestUuidFN = mprintf("%s.uuid",db_manifestName());
78 }
79 return (g.zManifestUuidFN);
80 }
81
82 /*
83 ** clear manifest filename caches
84 */
85 void db_FreeManifestNames(void){
86 if (g.zManifestFN){
87 free(g.zManifestFN);
88 g.zManifestFN = 0;
89 }
90 if (g.zManifestUuidFN){
91 free(g.zManifestUuidFN);
92 g.zManifestUuidFN = 0;
93 }
94 }
95
96 /*
97 ** Call this routine when a database error occurs.
98 */
99 static void db_err(const char *zFormat, ...){
@@ -783,10 +825,12 @@
825 while( n>1 && zPwd[n-1]=='/' ){
826 n--;
827 zPwd[n] = 0;
828 }
829 g.zLocalRoot = mprintf("%s/", zPwd);
830 g.zManifestFN = 0;
831 g.zManifestUuidFN = 0;
832 return 1;
833 }
834 }
835 n--;
836 while( n>0 && zPwd[n]!='/' ){ n--; }
@@ -1522,10 +1566,11 @@
1566 { "editor", 0, 16, "" },
1567 { "gdiff-command", 0, 16, "gdiff" },
1568 { "ignore-glob", 0, 40, "" },
1569 { "http-port", 0, 16, "8080" },
1570 { "localauth", 0, 0, "0" },
1571 { "manifest", 0, 32, "" },
1572 { "mtime-changes", 0, 0, "0" },
1573 { "pgp-command", 0, 32, "gpg --clearsign -o " },
1574 { "proxy", 0, 32, "off" },
1575 { "ssh-command", 0, 32, "" },
1576 { "web-browser", 0, 32, "" },
@@ -1584,10 +1629,12 @@
1629 **
1630 ** localauth If enabled, require that HTTP connections from
1631 ** 127.0.0.1 be authenticated by password. If
1632 ** false, all HTTP requests from localhost have
1633 ** unrestricted access to the repository.
1634 **
1635 ** manifest name of manifest file, standard is manifest
1636 **
1637 ** mtime-changes Use file modification times (mtimes) to detect when
1638 ** files have been modified. (Default "on".)
1639 **
1640 ** pgp-command Command used to clear-sign manifests at check-in.
@@ -1639,6 +1686,7 @@
1686 print_setting(ctrlSettings[i].name);
1687 }
1688 }else{
1689 usage("?PROPERTY? ?VALUE?");
1690 }
1691 db_FreeManifestNames();
1692 }
1693
+2
--- src/main.c
+++ src/main.c
@@ -59,10 +59,12 @@
5959
char *zRepositoryName; /* Name of the repository database */
6060
char *zRepoDb; /* SQLite database name for the repository */
6161
const char *zHome; /* Name of user home directory */
6262
int localOpen; /* True if the local database is open */
6363
char *zLocalRoot; /* The directory holding the local database */
64
+ char *zManifestFN; /* The name of the manifest file in checkouts */
65
+ char *zManifestUuidFN; /* The name of the manifest.uuid file in checkouts */
6466
int minPrefix; /* Number of digits needed for a distinct UUID */
6567
int fSqlTrace; /* True if -sqltrace flag is present */
6668
int fSqlPrint; /* True if -sqlprint flag is present */
6769
int fQuiet; /* True if -quiet flag is present */
6870
int fHttpTrace; /* Trace outbound HTTP requests */
6971
--- src/main.c
+++ src/main.c
@@ -59,10 +59,12 @@
59 char *zRepositoryName; /* Name of the repository database */
60 char *zRepoDb; /* SQLite database name for the repository */
61 const char *zHome; /* Name of user home directory */
62 int localOpen; /* True if the local database is open */
63 char *zLocalRoot; /* The directory holding the local database */
 
 
64 int minPrefix; /* Number of digits needed for a distinct UUID */
65 int fSqlTrace; /* True if -sqltrace flag is present */
66 int fSqlPrint; /* True if -sqlprint flag is present */
67 int fQuiet; /* True if -quiet flag is present */
68 int fHttpTrace; /* Trace outbound HTTP requests */
69
--- src/main.c
+++ src/main.c
@@ -59,10 +59,12 @@
59 char *zRepositoryName; /* Name of the repository database */
60 char *zRepoDb; /* SQLite database name for the repository */
61 const char *zHome; /* Name of user home directory */
62 int localOpen; /* True if the local database is open */
63 char *zLocalRoot; /* The directory holding the local database */
64 char *zManifestFN; /* The name of the manifest file in checkouts */
65 char *zManifestUuidFN; /* The name of the manifest.uuid file in checkouts */
66 int minPrefix; /* Number of digits needed for a distinct UUID */
67 int fSqlTrace; /* True if -sqltrace flag is present */
68 int fSqlPrint; /* True if -sqlprint flag is present */
69 int fQuiet; /* True if -quiet flag is present */
70 int fHttpTrace; /* Trace outbound HTTP requests */
71
--- src/setup.c
+++ src/setup.c
@@ -866,10 +866,11 @@
866866
if( !g.okSetup ){
867867
login_needed();
868868
}
869869
870870
style_header("Settings");
871
+ db_FreeManifestNames();
871872
db_begin_transaction();
872873
@ <p>This page provides a simple interface to the "fossil setting" command.
873874
@ See the "fossil help setting" output below for further information on
874875
@ the meaning of each setting.</p><hr />
875876
@ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div>
876877
--- src/setup.c
+++ src/setup.c
@@ -866,10 +866,11 @@
866 if( !g.okSetup ){
867 login_needed();
868 }
869
870 style_header("Settings");
 
871 db_begin_transaction();
872 @ <p>This page provides a simple interface to the "fossil setting" command.
873 @ See the "fossil help setting" output below for further information on
874 @ the meaning of each setting.</p><hr />
875 @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div>
876
--- src/setup.c
+++ src/setup.c
@@ -866,10 +866,11 @@
866 if( !g.okSetup ){
867 login_needed();
868 }
869
870 style_header("Settings");
871 db_FreeManifestNames();
872 db_begin_transaction();
873 @ <p>This page provides a simple interface to the "fossil setting" command.
874 @ See the "fossil help setting" output below for further information on
875 @ the meaning of each setting.</p><hr />
876 @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div>
877
+2 -2
--- src/zip.c
+++ src/zip.c
@@ -338,19 +338,19 @@
338338
nPrefix = blob_size(&filename);
339339
340340
if( manifest_parse(&m, &mfile) ){
341341
char *zName;
342342
zip_set_timedate(m.rDate);
343
- blob_append(&filename, "manifest", -1);
343
+ blob_append(&filename, db_manifestName(), -1);
344344
zName = blob_str(&filename);
345345
zip_add_folders(zName);
346346
zip_add_file(zName, &file);
347347
sha1sum_blob(&file, &hash);
348348
blob_reset(&file);
349349
blob_append(&hash, "\n", 1);
350350
blob_resize(&filename, nPrefix);
351
- blob_append(&filename, "manifest.uuid", -1);
351
+ blob_append(&filename, db_manifestUuidName(), -1);
352352
zName = blob_str(&filename);
353353
zip_add_file(zName, &hash);
354354
blob_reset(&hash);
355355
for(i=0; i<m.nFile; i++){
356356
int fid = uuid_to_rid(m.aFile[i].zUuid, 0);
357357
--- src/zip.c
+++ src/zip.c
@@ -338,19 +338,19 @@
338 nPrefix = blob_size(&filename);
339
340 if( manifest_parse(&m, &mfile) ){
341 char *zName;
342 zip_set_timedate(m.rDate);
343 blob_append(&filename, "manifest", -1);
344 zName = blob_str(&filename);
345 zip_add_folders(zName);
346 zip_add_file(zName, &file);
347 sha1sum_blob(&file, &hash);
348 blob_reset(&file);
349 blob_append(&hash, "\n", 1);
350 blob_resize(&filename, nPrefix);
351 blob_append(&filename, "manifest.uuid", -1);
352 zName = blob_str(&filename);
353 zip_add_file(zName, &hash);
354 blob_reset(&hash);
355 for(i=0; i<m.nFile; i++){
356 int fid = uuid_to_rid(m.aFile[i].zUuid, 0);
357
--- src/zip.c
+++ src/zip.c
@@ -338,19 +338,19 @@
338 nPrefix = blob_size(&filename);
339
340 if( manifest_parse(&m, &mfile) ){
341 char *zName;
342 zip_set_timedate(m.rDate);
343 blob_append(&filename, db_manifestName(), -1);
344 zName = blob_str(&filename);
345 zip_add_folders(zName);
346 zip_add_file(zName, &file);
347 sha1sum_blob(&file, &hash);
348 blob_reset(&file);
349 blob_append(&hash, "\n", 1);
350 blob_resize(&filename, nPrefix);
351 blob_append(&filename, db_manifestUuidName(), -1);
352 zName = blob_str(&filename);
353 zip_add_file(zName, &hash);
354 blob_reset(&hash);
355 for(i=0; i<m.nFile; i++){
356 int fid = uuid_to_rid(m.aFile[i].zUuid, 0);
357

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button