return FALSE;
}
+static void rename_path_prefix(GSList *filters, const gchar *old_prefix,
+ const gchar *new_prefix)
+{
+ GSList *action_cur, *cur;
+ gchar *new_path;
+
+ for (cur = filters; cur != NULL; cur = cur->next) {
+ FilteringProp *filtering = (FilteringProp *)cur->data;
+
+ for(action_cur = filtering->action_list ; action_cur != NULL ;
+ action_cur = action_cur->next) {
+
+ FilteringAction *action = action_cur->data;
+
+ if (action->type == MATCHACTION_SET_TAG ||
+ action->type == MATCHACTION_UNSET_TAG)
+ continue;
+ if (!action->destination)
+ continue;
+ if (!g_str_has_prefix(action->destination, old_prefix))
+ continue;
+
+ new_path = g_strconcat(new_prefix,
+ (action->destination + strlen(old_prefix)), NULL);
+ g_free(action->destination);
+ action->destination = new_path;
+ }
+ }
+}
+
+static gboolean prefs_filtering_rename_path_prefix_func(GNode *node, gpointer data)
+{
+ GSList *filters;
+ const gchar * old_prefix;
+ const gchar * new_prefix;
+ const gchar ** paths;
+ FolderItem *item;
+
+ paths = data;
+ old_prefix = paths[0];
+ new_prefix = paths[1];
+
+ cm_return_val_if_fail(old_prefix != NULL, FALSE);
+ cm_return_val_if_fail(new_prefix != NULL, FALSE);
+ cm_return_val_if_fail(node != NULL, FALSE);
+
+ item = node->data;
+ if (!item || !item->prefs)
+ return FALSE;
+ filters = item->prefs->processing;
+
+ rename_path_prefix(filters, old_prefix, new_prefix);
+
+ return FALSE;
+}
+
+void prefs_filtering_rename_path_prefix(const gchar *old_prefix,
+ const gchar *new_prefix)
+{
+ GList * cur;
+ const gchar *paths[2] = {NULL, NULL};
+ paths[0] = old_prefix;
+ paths[1] = new_prefix;
+ for (cur = folder_get_list() ; cur != NULL ; cur = g_list_next(cur)) {
+ Folder *folder;
+ folder = (Folder *) cur->data;
+ g_node_traverse(folder->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1,
+ prefs_filtering_rename_path_prefix_func, paths);
+ }
+
+ rename_path_prefix(pre_global_processing, old_prefix, new_prefix);
+ rename_path_prefix(post_global_processing, old_prefix, new_prefix);
+ rename_path_prefix(filtering_rules, old_prefix, new_prefix);
+
+ prefs_matcher_write_config();
+}
+
static void rename_tag(GSList * filters,
const gchar * old_tag, const gchar * new_tag)
{