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

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Oct 23 15:21:36 EDT 2007


Author: alexmv
Date: Tue Oct 23 15:21:29 2007
New Revision: 9420

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

Log:
 r23868 at zoq-fot-pik:  chmrr | 2007-10-23 15:18:50 -0400
  * UID COPY gets UIDPLUS stuff as well


Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command/Copy.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command/Copy.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command/Copy.pm	Tue Oct 23 15:21:29 2007
@@ -34,10 +34,9 @@
     return $self->no_command("Permission denied") if grep {not $_->copy_allowed($mailbox)} @messages;
 
     my @new = map {$_->copy($mailbox)} @messages;
-
     my $sequence = join(",",map {$_->uid} @messages);
     my $uids     = join(",",map {$_->uid} @new);
-    $self->ok_command("[COPYUID @{[$mailbox->uidvalidity]} $sequence $uids] OK COMPLETED");
+    $self->ok_command("[COPYUID @{[$mailbox->uidvalidity]} $sequence $uids] COPY COMPLETED");
 }
 
 1;

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	Tue Oct 23 15:21:29 2007
@@ -4,6 +4,7 @@
 use strict;
 
 use base qw/Net::Server::IMAP::Command/;
+use Net::Server::IMAP::Command::Search;
 
 sub validate {
     my $self = shift;
@@ -92,7 +93,10 @@
     my @messages = $self->connection->selected->get_uids($messages);
     return $self->no_command("Permission denied") if grep {not $_->copy_allowed($mailbox)} @messages;
 
-    $_->copy($mailbox) for @messages;
+    my @new = map {$_->copy($mailbox)} @messages;
+    my $sequence = join(",",map {$_->uid} @messages);
+    my $uids     = join(",",map {$_->uid} @new);
+    $self->ok_command("[COPYUID @{[$mailbox->uidvalidity]} $sequence $uids] COPY COMPLETED");
 
     $self->ok_completed;
 }



More information about the Bps-public-commit mailing list