projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e359e1
)
moan about and then delete empty message files
author
minima
<minima>
Fri, 25 Aug 2000 21:03:07 +0000
(21:03 +0000)
committer
minima
<minima>
Fri, 25 Aug 2000 21:03:07 +0000
(21:03 +0000)
Changes
patch
|
blob
|
history
perl/DXMsg.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index 813b28a03dc695a4b65ef684abceb8198d862229..cb438c688cc228fc8c0c8165f80763e85110b8a8 100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,3
+1,5
@@
+25Aug00=======================================================================
+1. moan about and then delete empty message files
24Aug00=======================================================================
1. Removed WWV command so that users can't interfere (read mess up) the
automatic feeds which come from various places on the net.
24Aug00=======================================================================
1. Removed WWV command so that users can't interfere (read mess up) the
automatic feeds which come from various places on the net.
diff --git
a/perl/DXMsg.pm
b/perl/DXMsg.pm
index 5c990177330ddc26c55fd20ccd7a0fcf242e49b1..879775f3596f9f08bb9afa0f1ffb605100412938 100644
(file)
--- a/
perl/DXMsg.pm
+++ b/
perl/DXMsg.pm
@@
-512,6
+512,11
@@
sub read_msg_header
}
$size = -s $fn;
$line = <$file>; # first line
}
$size = -s $fn;
$line = <$file>; # first line
+ if ($size == 0 || !$line) {
+ dbg('err', "Empty $fn $!");
+ Log('err', "Empty $fn $!");
+ return undef;
+ }
chomp $line;
$size -= length $line;
if (! $line =~ /^===/o) {
chomp $line;
$size -= length $line;
if (! $line =~ /^===/o) {
@@
-758,7
+763,12
@@
sub init
next unless /^m\d+$/o;
$ref = read_msg_header("$msgdir/$_");
next unless /^m\d+$/o;
$ref = read_msg_header("$msgdir/$_");
- next unless $ref;
+ unless ($ref) {
+ dbg('err', "Deleting $_");
+ Log('err', "Deleting $_");
+ unlink "$msgdir/$_";
+ next;
+ }
# delete any messages to 'badmsg.pl' places
if (grep $ref->{to} eq $_, @badmsg) {
# delete any messages to 'badmsg.pl' places
if (grep $ref->{to} eq $_, @badmsg) {