r18902 - gnucash/trunk/src/report/report-system - Fix Bug 590570 - When deleting more than one report in sequence the program crashes
Phil Longstaff
plongstaff at code.gnucash.org
Sat Mar 13 18:01:17 EST 2010
Author: plongstaff
Date: 2010-03-13 18:01:17 -0500 (Sat, 13 Mar 2010)
New Revision: 18902
Trac: http://svn.gnucash.org/trac/changeset/18902
Modified:
gnucash/trunk/src/report/report-system/report.scm
Log:
Fix Bug 590570 - When deleting more than one report in sequence the program crashes
Delete the custom report backup file before renaming the current custom report file.
Modified: gnucash/trunk/src/report/report-system/report.scm
===================================================================
--- gnucash/trunk/src/report/report-system/report.scm 2010-03-13 15:48:09 UTC (rev 18901)
+++ gnucash/trunk/src/report/report-system/report.scm 2010-03-13 23:01:17 UTC (rev 18902)
@@ -613,6 +613,8 @@
(define (gnc:save-all-reports)
(let ((temp-path (gnc-build-dotgnucash-path "saved-reports-2.4-backup")))
(gnc:debug "saving all reports...")
+ ;; On windows, it seems to crash if we try to rename without deleting the old file first.
+ (delete-file temp-path)
(rename-file gnc:current-saved-reports temp-path)
(hash-for-each (lambda (k v)
(if (gnc:report-template-parent-type v)
More information about the gnucash-changes
mailing list