+
+int prefs_update_config_version_folderlist(gint from_version)
+{
+ gint ver = from_version;
+
+ if (ver == -1) {
+ /* There was no config_version stored in the config, let's assume
+ * config_version same as clawsrc started at, to avoid breaking
+ * the configuration by "upgrading" it unnecessarily. */
+ debug_print("Folderlist: config_version not saved, using one from clawsrc: %d\n", starting_config_version);
+ ver = starting_config_version;
+ }
+
+ debug_print("Starting config_update at config_version %d,\n", ver);
+
+ if (!_version_check(ver))
+ return -1;
+
+ if (ver == CLAWS_CONFIG_VERSION) {
+ debug_print("No update necessary, already at latest config_version.\n");
+ return 0; /* nothing to do */
+ }
+
+ while (ver < CLAWS_CONFIG_VERSION) {
+ _update_config_folderlist(ver++);
+ }
+
+ debug_print("Config update done.\n");
+ return 1;
+}