* [PATCH 1/4] emergency: avoid needless mkpath dependency
2016-06-19 0:28 6% [PATCH 0/4] watch improvements for mirroring Eric Wong
@ 2016-06-19 0:28 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-06-19 0:28 UTC (permalink / raw)
To: meta
Be more explicit and slightly speed up tests.
---
lib/PublicInbox/Emergency.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/Emergency.pm b/lib/PublicInbox/Emergency.pm
index e402d30..4ee8621 100644
--- a/lib/PublicInbox/Emergency.pm
+++ b/lib/PublicInbox/Emergency.pm
@@ -12,11 +12,11 @@ use IO::Handle;
sub new {
my ($class, $dir) = @_;
+ -d $dir or mkdir($dir) or die "failed to mkdir($dir): $!\n";
foreach (qw(new tmp cur)) {
my $d = "$dir/$_";
next if -d $d;
- require File::Path;
- File::Path::mkpath($d); # croaks on fatal errors
+ -d $d or mkdir($d) or die "failed to mkdir($d): $!\n";
}
bless { dir => $dir, files => {}, t => 0, cnt => 0 }, $class;
}
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] watch improvements for mirroring
@ 2016-06-19 0:28 6% Eric Wong
2016-06-19 0:28 7% ` [PATCH 1/4] emergency: avoid needless mkpath dependency Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-06-19 0:28 UTC (permalink / raw)
To: meta
public-inbox-watch is more liberal than public-inbox-mda,
so we need to make some adjustments about how it handles
messages with missing Message-IDs, Subjects, and such.
Eric Wong (4):
emergency: avoid needless mkpath dependency
watch_maildir: add scan test
watch_maildir: spam removal support
import: allow messages without subject
lib/PublicInbox/Emergency.pm | 4 +-
lib/PublicInbox/Import.pm | 7 +-
lib/PublicInbox/WatchMaildir.pm | 141 ++++++++++++++++++++++++++++++----------
t/watch_maildir.t | 83 +++++++++++++++++++++++
4 files changed, 197 insertions(+), 38 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-06-19 0:28 6% [PATCH 0/4] watch improvements for mirroring Eric Wong
2016-06-19 0:28 7% ` [PATCH 1/4] emergency: avoid needless mkpath dependency Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).