diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-12-18 01:42:09 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-12-18 01:42:09 +0000 |
commit | 765e628df69ba9615473b60ea26e02353381e9ff (patch) | |
tree | fcc37b55fca57cffaa05be6f77682ed830cf095f /imap.c | |
parent | 343eba8240decd64ab424eee9d9b1d15b53cce9c (diff) | |
download | fetchmail-765e628df69ba9615473b60ea26e02353381e9ff.tar.gz fetchmail-765e628df69ba9615473b60ea26e02353381e9ff.tar.bz2 fetchmail-765e628df69ba9615473b60ea26e02353381e9ff.zip |
Fixed -e 0 bug.
svn path=/trunk/; revision=1579
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -647,7 +647,7 @@ static int imap_getrange(int sock, else *newp = -1; /* should never happen, RECENT is mandatory */ - expunged = deletions = 0; + expunged = 0; return(PS_SUCCESS); } @@ -826,6 +826,8 @@ static int imap_delete(int sock, struct query *ctl, int number) : "STORE %d +FLAGS (\\Deleted)", number))) return(ok); + else + deletions++; /* * We do an expunge after ctl->expunge messages, rather than @@ -833,7 +835,7 @@ static int imap_delete(int sock, struct query *ctl, int number) * won't result in lots of messages being fetched again during * the next session. */ - if (NUM_NONZERO(ctl->expunge) && (++deletions % ctl->expunge) == 0) + if (NUM_NONZERO(ctl->expunge) && (deletions % ctl->expunge) == 0) { if ((ok = gen_transact(sock, "EXPUNGE"))) return(ok); @@ -843,6 +845,7 @@ static int imap_delete(int sock, struct query *ctl, int number) #endif /* IMAP_UID */ expunged = deletions; + deletions = 0; } return(PS_SUCCESS); @@ -859,6 +862,9 @@ static int imap_logout(int sock, struct query *ctl) if ((ok = gen_transact(sock, "EXPUNGE"))) return(ok); + expunged = deletions; + deletions = 0; + #ifdef IMAP_UID /* not used */ expunge_uids(ctl); #endif /* IMAP_UID */ |