about summary refs log tree commit homepage
path: root/lib/PublicInbox/Msgmap.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Msgmap.pm')
-rw-r--r--lib/PublicInbox/Msgmap.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm
index 12833050..dea95731 100644
--- a/lib/PublicInbox/Msgmap.pm
+++ b/lib/PublicInbox/Msgmap.pm
@@ -39,6 +39,7 @@ sub dbh_new {
 
 sub new_file {
         my ($class, $f, $writable) = @_;
+        return if !$writable && !-r $f;
 
         my $dbh = dbh_new($f, $writable);
         my $self = bless { dbh => $dbh }, $class;