sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 9e476599cb48ba830e55d5f5fcd1a13eb137ce14
parent aa42404f63155b29fb148b10c72e222ad072efe0
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Mon, 28 Jan 2008 12:15:38 -0800

don't crash when people.txt is corrupted

This was a debug check, but if Sup crashes when writing out people.txt,
this will prevent it from ever starting again!

Diffstat:
M lib/sup/person.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/person.rb b/lib/sup/person.rb
@@ -9,7 +9,7 @@ class PersonManager
 
     ## read in stored people
     IO.readlines(fn).map do |l|
-      l =~ /^(.*)?:\s+(\d+)\s+(.*)$/ or raise "can't parse: #{l}"
+      l =~ /^(.*)?:\s+(\d+)\s+(.*)$/ or next
       email, time, name = $1, $2, $3
       @@people[email] = Person.new name, email, time, false
     end if File.exists? fn