Alyssa Ross
unread,Apr 15, 2020, 7:24:04 AM4/15/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mbl...@googlegroups.com, Alyssa Ross
Previously, a typo in the newsgroup name would leave an empty mailbox
for a non-existent newsgroup. This can be avoided by delaying maildir
initialization until after the NNTP server has 221ed the group.
---
contrib/msuck | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/contrib/msuck b/contrib/msuck
index 3fe58b7..44e1a98 100755
--- a/contrib/msuck
+++ b/contrib/msuck
@@ -57,10 +57,6 @@ STDOUT.sync = true
ARGV.each { |group|
- FileUtils.mkdir_p(File.join(dir, group, "cur"))
- FileUtils.mkdir_p(File.join(dir, group, "new"))
- FileUtils.mkdir_p(File.join(dir, group, "tmp"))
-
nntp.write("GROUP #{group}\r\n")
msg = nntp.gets
@@ -78,6 +74,10 @@ ARGV.each { |group|
low = high - LIMIT + 1 if number > LIMIT - 1
low = 1 if low <= 0
+ FileUtils.mkdir_p(File.join(dir, group, "cur"))
+ FileUtils.mkdir_p(File.join(dir, group, "new"))
+ FileUtils.mkdir_p(File.join(dir, group, "tmp"))
+
have = Dir.entries(File.join(dir, group, "cur")).
map { |f| $1.to_i if f =~ /N=(\d+)/ }.compact
--
2.25.1