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

alexmv at bestpractical.com alexmv at bestpractical.com
Mon Oct 15 19:53:56 EDT 2007


Author: alexmv
Date: Mon Oct 15 19:53:56 2007
New Revision: 9313

Modified:
   Net-Server-IMAP/   (props changed)
   Net-Server-IMAP/lib/Net/Server/IMAP/Command/Close.pm
   Net-Server-IMAP/lib/Net/Server/IMAP/Command/Expunge.pm
   Net-Server-IMAP/lib/Net/Server/IMAP/Command/Store.pm
   Net-Server-IMAP/lib/Net/Server/IMAP/Command/Uid.pm

Log:
 r23609 at zoq-fot-pik:  chmrr | 2007-10-15 16:20:16 -0400
  * CLOSE should silently EXPUNGE
  * Try to respect read-only a bit


Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command/Close.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command/Close.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command/Close.pm	Mon Oct 15 19:53:56 2007
@@ -21,6 +21,7 @@
 sub run {
     my $self = shift;
 
+    $self->connection->selected->expunge unless $self->connection->selected->read_only;
     $self->connection->selected(undef);
 
     $self->ok_completed();

Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command/Expunge.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command/Expunge.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command/Expunge.pm	Mon Oct 15 19:53:56 2007
@@ -12,6 +12,8 @@
     return $self->bad_command("Select a mailbox first")
         unless $self->connection->is_selected;
 
+    return $self->bad_command("Mailbox is read-only") if $self->connection->selected->read_only;
+
     my @options = $self->parsed_options;
     return $self->bad_command("Too many options") if @options;
 

Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command/Store.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command/Store.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command/Store.pm	Mon Oct 15 19:53:56 2007
@@ -12,6 +12,8 @@
     return $self->bad_command("Select a mailbox first")
         unless $self->connection->is_selected;
 
+    return $self->bad_command("Mailbox is read-only") if $self->connection->selected->read_only;
+
     my @options = $self->parsed_options;
     return $self->bad_command("Not enough options") if @options < 3;
     return $self->bad_command("Too many options") if @options > 3;

Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command/Uid.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command/Uid.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command/Uid.pm	Mon Oct 15 19:53:56 2007
@@ -66,6 +66,8 @@
 sub store {
     my $self = shift;
 
+    return $self->bad_command("Mailbox is read-only") if $self->connection->selected->read_only;
+
     my ( $messages, $what, @flags ) = @_;
     @flags = map {ref $_ ? @{$_} : $_} @flags;
     my @messages = $self->get_uids($messages);



More information about the Bps-public-commit mailing list