From 7ee0a5f3556939f0250cc95fb28bf05afe9260bd Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Thu, 7 Nov 2002 00:28:05 +0000 Subject: [PATCH] fix a third case of rule rewriting --- ChangeLog.claws | 8 +++++++- configure.in | 2 +- src/prefs_filtering.c | 9 ++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 0816412bd..bf0be469c 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,4 +1,10 @@ -2002-11-08 [colin] 0.8.5claws82 +2002-11-07 [colin] 0.8.5claws83 + + * src/prefs_filtering.c + Fix rule rewriting when moving a leaf folder to a + shorter path + +2002-11-07 [colin] 0.8.5claws82 * src/prefs_filtering.c fix a leak diff --git a/configure.in b/configure.in index a05d7ae7f..26ffbbd3e 100644 --- a/configure.in +++ b/configure.in @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=5 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws82 +EXTRA_VERSION=claws83 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/prefs_filtering.c b/src/prefs_filtering.c index 2c1623cf0..a80000493 100644 --- a/src/prefs_filtering.c +++ b/src/prefs_filtering.c @@ -660,7 +660,7 @@ void prefs_filtering_rename_path(const gchar *old_path, const gchar *new_path) action->destination = dest_path; } else { /* for non-leaf folders */ /* compare with trailing slash */ - if(!strncmp(old_path_with_sep, action->destination, oldpathlen+1)) { + if (!strncmp(old_path_with_sep, action->destination, oldpathlen+1)) { suffix = action->destination + oldpathlen + 1; dest_path = g_strconcat(new_path, @@ -670,6 +670,13 @@ void prefs_filtering_rename_path(const gchar *old_path, const gchar *new_path) action->destination = dest_path; } } + } else { + /* folder-moving a leaf */ + if (!strcmp(old_path, action->destination)) { + dest_path = g_strdup(new_path); + g_free(action->destination); + action->destination = dest_path; + } } } g_free(old_path_with_sep); -- 2.25.1