r14522 - gnucash/trunk - Ignore any unknown !Option specification. Fixes #160735.

Derek Atkins warlord at cvs.gnucash.org
Sun Jul 16 19:00:53 EDT 2006


Author: warlord
Date: 2006-07-16 19:00:52 -0400 (Sun, 16 Jul 2006)
New Revision: 14522
Trac: http://svn.gnucash.org/trac/changeset/14522

Modified:
   gnucash/trunk/
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/import-export/qif-import/qif-file.scm
Log:
Ignore any unknown !Option specification.  Fixes #160735.
BP




Property changes on: gnucash/trunk
___________________________________________________________________
Name: svk:merge
   - d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:12872
   + d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:12878

Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-07-16 21:35:45 UTC (rev 14521)
+++ gnucash/trunk/ChangeLog	2006-07-16 23:00:52 UTC (rev 14522)
@@ -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  <andi5.py at gmx.net>
 
 	* src/gnome-utils/gnc-main-window.c: Do not move windows on

Modified: gnucash/trunk/src/import-export/qif-import/qif-file.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-file.scm	2006-07-16 21:35:45 UTC (rev 14521)
+++ gnucash/trunk/src/import-export/qif-import/qif-file.scm	2006-07-16 23:00:52 UTC (rev 14522)
@@ -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 ")



More information about the gnucash-changes mailing list