From 1f9f037af0025d1cb395263f3dd8d26bb66cd45d Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 22 Nov 2013 15:33:33 +0000 Subject: [PATCH] Suppress a few harmless state file related warnings at startup git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23427 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/app-utils/gnc-state.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app-utils/gnc-state.c b/src/app-utils/gnc-state.c index a261b28dbc..cd05981d04 100644 --- a/src/app-utils/gnc-state.c +++ b/src/app-utils/gnc-state.c @@ -226,6 +226,12 @@ void gnc_state_save (const QofSession *session) { 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 @@ GKeyFile *gnc_state_get_current (void) { 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 (); }