diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sietima/MailStore/FS.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Sietima/MailStore/FS.pm b/lib/Sietima/MailStore/FS.pm index 1641c55..a45b433 100644 --- a/lib/Sietima/MailStore/FS.pm +++ b/lib/Sietima/MailStore/FS.pm @@ -62,8 +62,13 @@ sub retrieve_by_tags($self,@tags) { state $check = compile(Object,slurpy ArrayRef[Str]);$check->(@_); my %msgs; - for my $tag (@tags) { - $_++ for @msgs{$self->_tagged_by($tag)}; + if (@tags) { + for my $tag (@tags) { + $_++ for @msgs{$self->_tagged_by($tag)}; + } + } + else { + $msgs{$_->basename}=0 for $self->_msgdir->children; } my @ret; @@ -82,7 +87,7 @@ sub remove($self,$id) { state $check = compile(Object,Str);$check->(@_); for my $tag_file ($self->_tagdir->children) { - $tag_file->edit_lines( sub { /\A\Q$id\E\n?\z/ ? '' : $_ } ); + $tag_file->edit_lines( sub { $_='' if /\A\Q$id\E\n?\z/ } ); } $self->_msgdir->child($id)->remove; |