From e7e959f54f457f89a6286f37d4861ab2d52ceab0 Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Sun, 16 Jul 2006 23:00:52 +0000 Subject: [PATCH] Ignore any unknown !Option specification. Fixes #160735. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14522 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 3 +++ src/import-export/qif-import/qif-file.scm | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) 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 ")