fix renaming rules on folder rename
when folder is not a leaf folder
+2002-08-21 [colin] 0.8.1claws92
+
+ *src/prefs_filtering.c
+ fix renaming rules on folder rename
+ when folder is not a leaf folder
+
2002-08-21 [paul] 0.8.1claws91
* src/prefs_folder_item.c
2002-08-21 [paul] 0.8.1claws91
* src/prefs_folder_item.c
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
gchar *prefix;
gchar *suffix;
gchar *dest_path;
gchar *prefix;
gchar *suffix;
gchar *dest_path;
+ gchar *old_path_with_sep;
gint destlen;
gint prefixlen;
gint oldpathlen;
gint destlen;
gint prefixlen;
gint oldpathlen;
g_return_if_fail(new_path != NULL);
oldpathlen = strlen(old_path);
g_return_if_fail(new_path != NULL);
oldpathlen = strlen(old_path);
+ old_path_with_sep = g_strconcat(old_path,G_DIR_SEPARATOR_S,NULL);
for (cur = global_processing; cur != NULL; cur = cur->next) {
FilteringProp *filtering = (FilteringProp *)cur->data;
for (cur = global_processing; cur != NULL; cur = cur->next) {
FilteringProp *filtering = (FilteringProp *)cur->data;
g_free(prefix);
g_free(action->destination);
action->destination = dest_path;
g_free(prefix);
g_free(action->destination);
action->destination = dest_path;
+ } else { /* for non-leaf folders */
+ /* compare with trailing slash */
+ if(!strncmp(old_path_with_sep, action->destination, oldpathlen+1)) {
+
+ suffix = action->destination + oldpathlen + 1;
+ dest_path = g_strconcat(new_path,
+ G_DIR_SEPARATOR_S,
+ suffix, NULL);
+ g_free(action->destination);
+ action->destination = dest_path;
+ }