summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-10-28 10:52:47 -0700
committerSean Whitton <spwhitton@spwhitton.name>2019-10-28 10:53:27 -0700
commit398ae88b70914cd05735d08f11299e1cf7ab21ed (patch)
treed01a77f72b1db8de80554cf591b9ca32e6fe957c /lib
parentb1cf525b7f94ecd623aeec2e16f911d08da439bd (diff)
downloaddotfiles-398ae88b70914cd05735d08f11299e1cf7ab21ed.tar.gz
set keep_dups for all mailbox access
Notmuch deals with duplicates just fine, so let's minimise mangling performed by Mail::Box.
Diffstat (limited to 'lib')
-rw-r--r--lib/perl5/Local/Homedir/Mail.pm19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/perl5/Local/Homedir/Mail.pm b/lib/perl5/Local/Homedir/Mail.pm
index e490a4c2..7b2a0bcf 100644
--- a/lib/perl5/Local/Homedir/Mail.pm
+++ b/lib/perl5/Local/Homedir/Mail.pm
@@ -42,14 +42,21 @@ sub archive_to_mbox {
# thereby perform all the moves and copies
my $mgr = Mail::Box::Manager->new();
- my $source = $mgr->open($source_path, access => 'rw', create => 0);
- my $mbox
- = $mgr->open($mbox_path, access => 'a', create => 1, type => 'mbox');
+ my $source
+ = $mgr->open($source_path, access => 'rw', create => 0, keep_dups => 1);
+ my $mbox = $mgr->open(
+ $mbox_path,
+ access => 'a',
+ create => 1,
+ keep_dups => 1,
+ type => 'mbox'
+ );
my $expanded = $mgr->open(
$expanded_path,
- access => 'a',
- create => 1,
- type => 'maildir'
+ access => 'a',
+ create => 1,
+ keep_dups => 1,
+ type => 'maildir',
);
my $now = time();