r23427 - gnucash/trunk/src/app-utils - Suppress a few harmless state file related warnings at startup

Geert Janssens gjanssens at code.gnucash.org
Fri Nov 22 10:33:33 EST 2013


Author: gjanssens
Date: 2013-11-22 10:33:33 -0500 (Fri, 22 Nov 2013)
New Revision: 23427
Trac: http://svn.gnucash.org/trac/changeset/23427

Modified:
   gnucash/trunk/src/app-utils/gnc-state.c
Log:
Suppress a few harmless state file related warnings at startup

Modified: gnucash/trunk/src/app-utils/gnc-state.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-state.c	2013-11-22 15:33:22 UTC (rev 23426)
+++ gnucash/trunk/src/app-utils/gnc-state.c	2013-11-22 15:33:33 UTC (rev 23427)
@@ -226,6 +226,12 @@
 {
     GError *error = NULL;
 
+    if (!qof_session_get_url(session))
+    {
+        DEBUG("No file associated with session - skip state saving");
+        return;
+    }
+
     gnc_state_set_base (session);
 
     /* Write it all out to disk */
@@ -246,7 +252,7 @@
 {
     if (!state_file)
     {
-        PWARN ("No pre-existing state found, creating new one");
+        PINFO ("No pre-existing state found, creating new one");
         state_file = g_key_file_new ();
     }
 



More information about the gnucash-changes mailing list