fix a third case of rule rewriting
authorColin Leroy <colin@colino.net>
Thu, 7 Nov 2002 00:28:05 +0000 (00:28 +0000)
committerColin Leroy <colin@colino.net>
Thu, 7 Nov 2002 00:28:05 +0000 (00:28 +0000)
ChangeLog.claws
configure.in
src/prefs_filtering.c

index 0816412bd04af8467b30e1b6ea07fe2101512a10..bf0be469c9bd4392da0074edd306eda757d15eff 100644 (file)
@@ -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
 
        * src/prefs_filtering.c
                fix a leak
index a05d7ae7f9c60acf984022fd4090b3983a9fb53d..26ffbbd3e188611eabd8015fc6e18804c1e04163 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
 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
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 2c1623cf0b4f171102d0f49d14538df6b8fe3f66..a80000493e5a528d7b0e0aa6d3f86d3909476c44 100644 (file)
@@ -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 */
                                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,
                                        
                                        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;
                                }
                        }
                                        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);
                }
        }
        g_free(old_path_with_sep);