diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-07-13 18:52:48 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-07-13 19:01:30 -0700 |
commit | 53dcdf67ccd602ae2a551a6e718a41fb4d92c8c4 (patch) | |
tree | e2934276823f06dd2c2b6cae8874ad1ca98c820d | |
parent | c68f05c4f414d8c5f0272a43af0344d058f9ce7b (diff) | |
download | dotfiles-53dcdf67ccd602ae2a551a6e718a41fb4d92c8c4.tar.gz |
move files indicating which mboxes have been expanded into a subdir
We can then have notmuch ignore them without using a regular expression.
-rw-r--r-- | .notmuch-config | 2 | ||||
-rw-r--r-- | perl5/Local/Homedir/Mail.pm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/.notmuch-config b/.notmuch-config index d8794b0d..2cadf617 100644 --- a/.notmuch-config +++ b/.notmuch-config @@ -43,7 +43,7 @@ other_email=spwhitton@arizona.edu;spwhitton@email.arizona.edu; [new] tags=unread; -ignore=.uidvalidity;.mbsyncstate;.nnmaildir; +ignore=.uidvalidity;.mbsyncstate;.nnmaildir;.expanded; # Search configuration # diff --git a/perl5/Local/Homedir/Mail.pm b/perl5/Local/Homedir/Mail.pm index 6ee94046..d1e08ff0 100644 --- a/perl5/Local/Homedir/Mail.pm +++ b/perl5/Local/Homedir/Mail.pm @@ -76,7 +76,7 @@ sub archive_to_mbox { $expanded->acceptMessages; $mgr->closeAllFolders; open my $touch_fh, ">", - catfile($expanded_path, "." . (splitpath $mbox_path)[2]) . ".done"; + catfile($expanded_path, ".expanded", (splitpath $mbox_path)[2]); gzip($mbox_path, "$mbox_path.gz") or die "gzip failed: $GzipError\n"; unlink $mbox_path if -e "$mbox_path.gz"; @@ -86,7 +86,7 @@ sub expand_mbox { my ($source_path, $target) = @_; (my $source_name = (splitpath $source_path)[2]) =~ s/\.gz$//; my $expanded_path = catfile $target, ".$source_name"; - my $donefile = $expanded_path . ".done"; + my $donefile = catfile $target, ".expanded", $source_name; # Check whether we finished, or got partway there. return if -e $donefile; |