Browse Source

unscrew --delete by merging it into the config file. merge --expunge as

well for symmetry.
wip/ssl-fprint
Oswald Buddenhagen 21 years ago
parent
commit
af8c4396fe
  1. 4
      src/compat/config.c
  2. 7
      src/compat/isync.1
  3. 2
      src/compat/isync.h
  4. 12
      src/compat/main.c

4
src/compat/config.c

@ -307,9 +307,9 @@ write_channel_parm( FILE *fp, config_t *cfg )
fprintf( fp, "MaxSize %d\n", cfg->max_size );
if (cfg->max_messages)
fprintf( fp, "MaxMessages %d\n", cfg->max_messages );
if (!cfg->delete)
if (!cfg->delete && !delete)
fputs( "Sync New ReNew Flags\n", fp );
if (cfg->expunge)
if (cfg->expunge || expunge)
fputs( "Expunge Both\n", fp );
fputc( '\n', fp );
}

7
src/compat/isync.1

@ -18,7 +18,7 @@
\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\"
..
.TH isync 1 "2004 Mar 27"
.TH isync 1 "2004 Mar 29"
..
.SH NAME
isync - synchronize IMAP4 and Maildir mailboxes
@ -123,8 +123,9 @@ Enable printing of \fIdebug\fR messages.
\fB-w\fR, \fB--write\fR
Don't run \fBmbsync\fR, but instead write a permanent config file for it.
The UID mappings of all configured mailboxes will be migrated.
Note that some command line options that would affect an actual sync operation
will be incorporated into the new config file as well.
Note that most command line options that would affect an actual sync operation
will be incorporated into the new config file as well; exceptions are
--fast and --create[-remote|-local].
The name of the new config file is determined by replacing the last occurrence
of "isync" with "mbsync", or appending ".mbsync" if "isync" was not found.
.TP

2
src/compat/isync.h

@ -78,7 +78,7 @@ extern const char *Home;
extern config_t global, *boxes;
extern const char *maildir, *xmaildir, *folder, *inbox;
extern int o2o, altmap;
extern int o2o, altmap, delete, expunge;
/* config.c */
void load_config( const char *, config_t *** );

12
src/compat/main.c

@ -138,8 +138,6 @@ add_arg( char ***args, const char *arg )
(*args)[nu + 1] = 0;
}
#define OP_EXPUNGE (1<<0)
#define OP_DELETE (1<<1)
#define OP_FAST (1<<2)
#define OP_CREATE_REMOTE (1<<3)
#define OP_CREATE_LOCAL (1<<4)
@ -147,7 +145,7 @@ add_arg( char ***args, const char *arg )
int Quiet, Verbose, Debug;
config_t global, *boxes;
const char *maildir, *xmaildir, *folder, *inbox;
int o2o, altmap;
int o2o, altmap, delete, expunge;
const char *Home;
@ -216,10 +214,10 @@ main( int argc, char **argv )
config = optarg;
break;
case 'd':
ops |= OP_DELETE;
delete = 1;
break;
case 'e':
ops |= OP_EXPUNGE;
expunge = 1;
break;
case 'f':
ops |= OP_FAST;
@ -395,14 +393,10 @@ main( int argc, char **argv )
add_arg( &args, path2 );
if (ops & OP_FAST)
add_arg( &args, "-Ln" );
else if (!(ops & OP_DELETE))
add_arg( &args, "-nNf" );
if (ops & OP_CREATE_REMOTE)
add_arg( &args, "-Cm" );
if (ops & OP_CREATE_LOCAL)
add_arg( &args, "-Cs" );
if (ops & OP_EXPUNGE)
add_arg( &args, "-X" );
if (list)
add_arg( &args, "-l" );
if (o2o) {

Loading…
Cancel
Save