r23092 - gnucash/trunk/src/report/report-system - Fix crash when saved-reports file doesn't exist

Geert Janssens gjanssens at code.gnucash.org
Fri Jul 5 12:38:21 EDT 2013


Author: gjanssens
Date: 2013-07-05 12:38:21 -0400 (Fri, 05 Jul 2013)
New Revision: 23092
Trac: http://svn.gnucash.org/trac/changeset/23092

Modified:
   gnucash/trunk/src/report/report-system/report.scm
Log:
Fix crash when saved-reports file doesn't exist

Modified: gnucash/trunk/src/report/report-system/report.scm
===================================================================
--- gnucash/trunk/src/report/report-system/report.scm	2013-07-05 16:38:06 UTC (rev 23091)
+++ gnucash/trunk/src/report/report-system/report.scm	2013-07-05 16:38:21 UTC (rev 23092)
@@ -643,7 +643,8 @@
        ;; On windows, it seems to crash if we try to rename without deleting the old file first.
        (if (access? temp-path F_OK)
            (delete-file temp-path))
-       (rename-file gnc:current-saved-reports temp-path)
+       (if (access? gnc:current-saved-reports F_OK)
+           (rename-file gnc:current-saved-reports temp-path))
        (hash-for-each (lambda (k v)
                         (if (gnc:report-template-parent-type v)
                             (begin



More information about the gnucash-changes mailing list