undocumented flag -J to skip committing the new sync state.
This commit is contained in:
parent
a1a5a817bb
commit
9c6c158ef3
|
@ -196,6 +196,7 @@ extern const char *Home;
|
||||||
#define VERBOSE 2
|
#define VERBOSE 2
|
||||||
#define QUIET 4
|
#define QUIET 4
|
||||||
#define VERYQUIET 8
|
#define VERYQUIET 8
|
||||||
|
#define KEEPJOURNAL 16
|
||||||
|
|
||||||
extern int DFlags;
|
extern int DFlags;
|
||||||
|
|
||||||
|
|
|
@ -372,6 +372,9 @@ main( int argc, char **argv )
|
||||||
case 'D':
|
case 'D':
|
||||||
DFlags |= DEBUG | QUIET;
|
DFlags |= DEBUG | QUIET;
|
||||||
break;
|
break;
|
||||||
|
case 'J':
|
||||||
|
DFlags |= KEEPJOURNAL;
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
version();
|
version();
|
||||||
case 'h':
|
case 'h':
|
||||||
|
|
|
@ -914,9 +914,11 @@ sync_boxes( store_t *ctx[], const char *names[], channel_conf_t *chan )
|
||||||
|
|
||||||
fclose( nfp );
|
fclose( nfp );
|
||||||
fclose( jfp );
|
fclose( jfp );
|
||||||
/* order is important! */
|
if (!(DFlags & KEEPJOURNAL)) {
|
||||||
rename( nname, dname );
|
/* order is important! */
|
||||||
unlink( jname );
|
rename( nname, dname );
|
||||||
|
unlink( jname );
|
||||||
|
}
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
for (srec = recs; srec; srec = nsrec) {
|
for (srec = recs; srec; srec = nsrec) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user