fix recover script
svn: r2953
This commit is contained in:
parent
5c392a8d72
commit
523d7db8bc
|
@ -126,3 +126,8 @@ entry is a list of at least two elements:
|
|||
The overriding-options feature was a quick hack for what I needed, and
|
||||
it should be replaced eventually. There's a lot of duplication of
|
||||
information in the current format.
|
||||
|
||||
|
||||
For an individual folder, if your "mailbox" file gets corrupted, you
|
||||
can run the "recover.ss" script with the mail folder's directory as
|
||||
the current directory.
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
(lib "head.ss" "net"))
|
||||
|
||||
(define msgs
|
||||
(sort (filter (lambda (x) (regexp-match "^[0-9]*$" x)) (directory-list))
|
||||
(lambda (a b) (< (string->number a) (string->number b)))))
|
||||
(sort (filter (lambda (x) (regexp-match #rx"^[0-9]*$" (path->string x))) (directory-list))
|
||||
(lambda (a b) (< (string->number (path->string a))
|
||||
(string->number (path->string b))))))
|
||||
|
||||
(define mailbox
|
||||
(let loop ([msgs msgs][p 1])
|
||||
|
@ -15,7 +16,7 @@
|
|||
(let ([header (with-input-from-file msg
|
||||
(lambda () (read-string (file-size msg))))])
|
||||
(cons (list
|
||||
(string->number msg)
|
||||
(string->number (path->string msg))
|
||||
p
|
||||
(file-exists? (format "~abody" msg))
|
||||
(extract-field "From" header)
|
||||
|
|
Loading…
Reference in New Issue
Block a user