Skip to content

Commit

Permalink
disabled errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Miller committed Dec 14, 2013
1 parent 57f8ec7 commit ee1f44c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 5 additions & 0 deletions Changes
@@ -1,3 +1,8 @@
1.2204: Sat Dec 14 2013
- disable error checking on expunge. It's not clear to me
that this ever produces an error (which would be with the
delete or select commands, not expunge).

1.2203: Mon Oct 07 2013
- https://rt.cpan.org/Public/Bug/Display.html?id=89296
I think I fixed a design problem (no argument sanitization)
Expand Down
8 changes: 2 additions & 6 deletions Simple.pm
Expand Up @@ -9,7 +9,7 @@ use IO::Socket;
use IO::Select;
use Net::IMAP::Simple::PipeSocket;

our $VERSION = "1.2203";
our $VERSION = "1.2204";

BEGIN {
# I'd really rather the pause/cpan indexers miss this "package"
Expand Down Expand Up @@ -1003,22 +1003,18 @@ sub expunge_mailbox {
# S: * 8 EXPUNGE
# S: A202 OK EXPUNGE completed

$self->{_waserr} = 1;

my @expunged;
return $self->_process_cmd(
cmd => ['EXPUNGE'],
final => sub {
$self->_clear_cache;
return if $self->{_waserr};
return @expunged if wantarray;
return @expunged if wantarray; # don't return 0E0 if want array and we're empty
return "0E0" unless @expunged;
return @expunged;
},
process => sub {
if( $_[0] =~ m/^\s*\*\s+(\d+)\s+EXPUNGE[\r\n]*$/i ) {
push @expunged, $1;
delete $self->{_waserr};
}
},
);
Expand Down

0 comments on commit ee1f44c

Please sign in to comment.