r21827 - gnucash/branches/2.4/src/backend/sql - [21825] [Bug 666329] Empty database after a little while

Christian Stimming cstim at code.gnucash.org
Sun Jan 8 16:18:03 EST 2012


Author: cstim
Date: 2012-01-08 16:18:03 -0500 (Sun, 08 Jan 2012)
New Revision: 21827
Trac: http://svn.gnucash.org/trac/changeset/21827

Modified:
   gnucash/branches/2.4/src/backend/sql/gnc-backend-sql.c
Log:
[21825] [Bug 666329] Empty database after a little while

Reverse qof_book_mark_saved and qof_instance_mark_clean so that the book
is dirty for qof_book_mark_saved when it's the instance.

Original commit by jralls

Modified: gnucash/branches/2.4/src/backend/sql/gnc-backend-sql.c
===================================================================
--- gnucash/branches/2.4/src/backend/sql/gnc-backend-sql.c	2012-01-08 20:08:54 UTC (rev 21826)
+++ gnucash/branches/2.4/src/backend/sql/gnc-backend-sql.c	2012-01-08 21:18:03 UTC (rev 21827)
@@ -672,8 +672,8 @@
         (void)gnc_sql_connection_rollback_transaction( be->conn );
 
         // Don't let unknown items still mark the book as being dirty
+        qof_book_mark_saved( be->primary_book );
         qof_instance_mark_clean(inst);
-        qof_book_mark_saved( be->primary_book );
         LEAVE( "Rolled back - unknown object type" );
         return;
     }
@@ -689,8 +689,8 @@
 
     (void)gnc_sql_connection_commit_transaction( be->conn );
 
+    qof_book_mark_saved( be->primary_book );
     qof_instance_mark_clean(inst);
-    qof_book_mark_saved( be->primary_book );
 
     LEAVE( "" );
 }



More information about the gnucash-changes mailing list