[Bps-public-commit] Net-IMAP-Server branch, master, updated. 1.27-3-gdc9195e
Alex Vandiver
alexmv at bestpractical.com
Mon Jun 7 14:53:02 EDT 2010
The branch, master has been updated
via dc9195e599841b46209065c1be5bb791170c0f76 (commit)
via 06cb85783d34173ab8842900b98bd63b619afd22 (commit)
from 0e208ef1f06e4ec4b85d7a653baecbdbc268570c (commit)
Summary of changes:
lib/Net/IMAP/Server/Connection.pm | 7 ++++---
lib/Net/IMAP/Server/Message.pm | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 06cb85783d34173ab8842900b98bd63b619afd22
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Jun 7 13:00:54 2010 -0400
strptime("%e") can generate leading spaces, which strftime("%e") will fail to parse
Solve this problem by allowing arbitrary leading whitespace("%n") when parsing
diff --git a/lib/Net/IMAP/Server/Message.pm b/lib/Net/IMAP/Server/Message.pm
index 3e52c0d..b5cf720 100644
--- a/lib/Net/IMAP/Server/Message.pm
+++ b/lib/Net/IMAP/Server/Message.pm
@@ -79,7 +79,7 @@ sub internaldate {
my $value = shift;
if (ref $value) {
- $self->{internaldate} = $value->strftime("%e-%b-%Y %T %z");
+ $self->{internaldate} = $value->strftime("%n%e-%b-%Y %T %z");
} else {
$self->{internaldate} = $value;
$value = $self->INTERNALDATE_PARSER->parse_datetime($value);
commit dc9195e599841b46209065c1be5bb791170c0f76
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Jun 7 14:53:54 2010 -0400
Ensure that EXAMINE followed by SELECT on the same mailbox correctly sets read-only-ness
diff --git a/lib/Net/IMAP/Server/Connection.pm b/lib/Net/IMAP/Server/Connection.pm
index 0100600..30b473d 100644
--- a/lib/Net/IMAP/Server/Connection.pm
+++ b/lib/Net/IMAP/Server/Connection.pm
@@ -132,9 +132,10 @@ sub selected {
# This is just being called as a getter
return $self->_selected unless @_;
- # This is a setter, but isn't actually changing the mailbox.
- return $self->_selected if $mailbox and $self->_selected
- and $mailbox eq $self->_selected;
+ # This is a setter, but isn't actually changing the mailbox, nor
+ # changing the read-only-ness.
+ return $self->_selected if ($mailbox || "") eq ($self->_selected || "")
+ and ($self->selected_read_only || 0) == ($read_only || 0);
# Otherwise, flush any untagged messages, close the old, and open
# the new.
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list