[Commits] [SCM] claws branch, master, updated. 3.16.0-17-ga9608e4

ticho at claws-mail.org ticho at claws-mail.org
Fri Jan 19 19:03:16 CET 2018


The branch, master has been updated
       via  a9608e4cd547e403b87feccd13817e14f4a10d97 (commit)
      from  5bcc8ead3ddf78902cb940ba7659acf335f78247 (commit)

Summary of changes:
 src/main.c |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit a9608e4cd547e403b87feccd13817e14f4a10d97
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Fri Jan 19 19:02:59 2018 +0100

    Handle failed/aborted folderlist config_version update in main.c

diff --git a/src/main.c b/src/main.c
index ed7bf5c..1610953 100644
--- a/src/main.c
+++ b/src/main.c
@@ -993,6 +993,7 @@ int main(int argc, char *argv[])
 	GSList *plug_list = NULL;
 	gboolean never_ran = FALSE;
 	gboolean mainwin_shown = FALSE;
+	gint ret;
 
 	START_TIMING("startup");
 
@@ -1358,12 +1359,22 @@ int main(int argc, char *argv[])
 #endif	
 	/* If we can't read a folder list or don't have accounts,
 	 * it means the configuration's not done. Either this is
-	 * a brand new install, either a failed/refused migration.
-	 * So we'll start the wizard.
+	 * a brand new install, a failed/refused migration,
+	 * or a failed config_version upgrade.
 	 */
-	if (folder_read_list() < 0) {
+	if ((ret = folder_read_list()) < 0) {
 		prefs_destroy_cache();
 		
+		if (ret == -2) {
+			/* config_version update failed in folder_read_list(). We
+			 * do not want to run the wizard, just exit. */
+			debug_print("Folderlist version upgrade failed, exiting\n");
+#ifdef G_OS_WIN32
+			win32_close_log();
+#endif
+			exit(203);
+		}
+
 		/* if run_wizard returns FALSE it's because it's
 		 * been cancelled. We can't do much but exit.
 		 * however, if the user was asked for a migration,

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list