r14560 - gnucash/branches/2.0 - Ignore any unknown !Option specification. Fixes #160735.

Derek Atkins warlord at cvs.gnucash.org
Tue Jul 25 22:36:01 EDT 2006


Author: warlord
Date: 2006-07-25 22:36:00 -0400 (Tue, 25 Jul 2006)
New Revision: 14560
Trac: http://svn.gnucash.org/trac/changeset/14560

Modified:
   gnucash/branches/2.0/
   gnucash/branches/2.0/ChangeLog
   gnucash/branches/2.0/src/import-export/qif-import/qif-file.scm
Log:
Ignore any unknown !Option specification.  Fixes #160735.
Audited by jsled.
Merged from r14522.



Property changes on: gnucash/branches/2.0
___________________________________________________________________
Name: svk:merge
   - d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:12928
   + d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:12933

Modified: gnucash/branches/2.0/ChangeLog
===================================================================
--- gnucash/branches/2.0/ChangeLog	2006-07-25 22:22:55 UTC (rev 14559)
+++ gnucash/branches/2.0/ChangeLog	2006-07-26 02:36:00 UTC (rev 14560)
@@ -30,6 +30,11 @@
 	  Apparently some distributions ship g-wrap-config separately
 	  from the g-wrap.scm guile module.
 
+2006-07-15  Derek Atkins  <derek at ihtfp.com>
+
+	* src/import-export/qif-import/qif-file.scm:
+	  Ignore any unknown !Option specification.  Fixes #160735.
+
 	* src/business/business-gnome/dialog-invoice.c:
 	  Set the summary bar values when the window is first opened (#345978).
 

Modified: gnucash/branches/2.0/src/import-export/qif-import/qif-file.scm
===================================================================
--- gnucash/branches/2.0/src/import-export/qif-import/qif-file.scm	2006-07-25 22:22:55 UTC (rev 14559)
+++ gnucash/branches/2.0/src/import-export/qif-import/qif-file.scm	2006-07-26 02:36:00 UTC (rev 14560)
@@ -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