[Bps-public-commit] r9608 - in Net-Server-IMAP: lib/Net/Server/IMAP

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Nov 6 15:01:31 EST 2007


Author: alexmv
Date: Tue Nov  6 15:01:31 2007
New Revision: 9608

Modified:
   Net-Server-IMAP/   (props changed)
   Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm

Log:
 r24488 at zoq-fot-pik:  chmrr | 2007-11-06 15:01:05 -0500
  * Possibly unnecessary edge case, where we can hopefully avoid confusing the client


Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm	Tue Nov  6 15:01:31 2007
@@ -172,12 +172,19 @@
     $self->untagged_fetch({});
 
     if ($args{expunged}) {
+        # Make sure that they know of at least the existance of what's being expunged.
+        my $max = 0;
+        $max = $max < $_ ? $_ : $max for @{$self->untagged_expunge};
+        $self->untagged_response( "$max EXISTS" ) if $max > $self->previous_exists;
+
+        # Send the expnges, clear out the temporary message store
         $self->previous_exists( $self->previous_exists - @{$self->untagged_expunge} );
         $self->untagged_response( map {"$_ EXPUNGE"} @{$self->untagged_expunge} );
         $self->untagged_expunge([]);
         $self->temporary_messages(undef);
     }
 
+    # Let them know of more EXISTS
     my $expected = $self->previous_exists;
     my $now = @{$self->temporary_messages || $self->selected->messages};
     $self->untagged_response( $now . ' EXISTS' ) if $expected != $now;



More information about the Bps-public-commit mailing list