From: Chris Hanson Date: Wed, 5 Jul 2000 01:04:40 +0000 (+0000) Subject: When examining prompt history, ignore malformed URLs that generate X-Git-Tag: 20090517-FFI~3389 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b8e8a56abca3c9eca4324f6543497f4221adf382;p=mit-scheme.git When examining prompt history, ignore malformed URLs that generate errors during parsing. --- diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index f68040b9a..b5e7d4805 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.206 2000/07/04 05:12:30 cph Exp $ +;;; $Id: imail-top.scm,v 1.207 2000/07/05 01:04:40 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -1290,11 +1290,16 @@ If it doesn't exist, it is created first." (prompt-for-imail-url-string "Copy messages to folder" (make-peer-url - (let ((history - (prompt-history-strings 'IMAIL-COPY-FOLDER-TARGET))) - (if (pair? history) - (imail-parse-partial-url (car history)) - (imail-default-url))) + (or (let ((history + (prompt-history-strings 'IMAIL-COPY-FOLDER-TARGET))) + (and (pair? history) + (let ((url + (ignore-errors + (lambda () + (imail-parse-partial-url (car history)))))) + (and (url? url) + url)))) + (imail-default-url)) (url-base-name (imail-parse-partial-url from))) 'HISTORY 'IMAIL-COPY-FOLDER-TARGET)))) (lambda (from to)