diff --git a/ChangeLog b/ChangeLog index eca8f8073a..c495166876 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ Apparently some distributions ship g-wrap-config separately from the g-wrap.scm guile module. + * src/import-export/qif-import/qif-file.scm: + Ignore any unknown !Option specification. Fixes #160735. + 2006-07-16 Andreas Köhler * src/gnome-utils/gnc-main-window.c: Do not move windows on diff --git a/src/import-export/qif-import/qif-file.scm b/src/import-export/qif-import/qif-file.scm index 7880c17bf2..4195ad0bcc 100644 --- a/src/import-export/qif-import/qif-file.scm +++ b/src/import-export/qif-import/qif-file.scm @@ -79,7 +79,7 @@ ;; now do something with the line (if (eq? tag #\!) - (begin + (let ((old-qstate qstate-type)) (set! qstate-type (qif-parse:parse-bang-field value)) (case qstate-type ((type:bank type:cash type:ccard type:invst type:port @@ -101,7 +101,17 @@ ((option:autoswitch) (set! ignore-accounts #t)) ((clear:autoswitch) - (set! ignore-accounts #f)))) + (set! ignore-accounts #f)) + (else + ;; Ignore any other "option:" identifiers and + ;; just return to the previously known !type + (if (string-match "^option:" + (symbol->string qstate-type)) + (begin + (display "qif-file:read-file ignoring ") + (write qstate-type) + (newline) + (set! qstate-type old-qstate)))))) ;;; (#t ;;; (display "qif-file:read-file can't handle ")