mailfs - updated version for mc 4.5.x
Christian Gennerat
christian.gennerat at vz.cit.alcatel.fr
Mon Jul 2 08:13:16 UTC 2001
Peter Daum a écrit :
> my "mailfs" (extfs for Berkeley style email folders) used to report the
> number of lines in the message body as the file size, which didn't work
> any more with recent versions of MC (the viewer only displayed that many
> bytes).
>
1)
My mail files are stored by Samba on my linux box,
but they are created by a Windows Netscape
diff -Bbu /usr/lib/mc/extfs/mailfs.orig /usr/lib/mc/extfs/mailfs
--- mailfs.orig Sat Jun 30 08:58:37 2001
+++ mailfs Sat Jun 30 09:03:37 2001
@@ -34,7 +34,7 @@
sub process_header {
while (<IN>) {
$size += length;
- last if /^$/ or eof;
+ last if /^\r?$/ or eof;
if (/^Date: (.*)$/) {
$date=&$parse_date($1);
} elsif (/^Subject: (.*)$/) {
@@ -78,7 +78,7 @@
$blank= 0;
} else {
$size += length;
- $blank= /^$/;
+ $blank= /^\r?$/;
}
}
}
@@ -95,7 +95,7 @@
exit(0) if ($msg_nr > $nr);
$blank= 0;
} else {
- $blank= /^$/;
+ $blank= /^\r?$/;
}
print if ($msg_nr == $nr);
}
2) in mc.ext, change
# if you view your mail directory with mc
# don't use any other program for viewing mails !
type/mail
Open=%cd %p#mailfs
View=%cd %p#mailfs
More information about the mc-devel
mailing list