aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-07-13 07:56:38 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-07-13 07:56:38 +0000
commit45df4ba499e0c859f49a0bc10747bd3a24cfeddb (patch)
tree9c171ffa13f39b9235d4f0b8da10e467085f43ff /libsylph
parentf6d6ce0c4e3a8251cdceeeaf7acfb69be56c617a (diff)
win32: fixes renaming of folder didn't modify filter actions.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1863 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/filter.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libsylph/filter.c b/libsylph/filter.c
index a0ab4ccf..d9b02683 100644
--- a/libsylph/filter.c
+++ b/libsylph/filter.c
@@ -1303,15 +1303,14 @@ void filter_rule_rename_dest_path(FilterRule *rule, const gchar *old_path,
if (action->str_value &&
!strncmp(old_path, action->str_value, oldpathlen)) {
base = action->str_value + oldpathlen;
- if (*base != G_DIR_SEPARATOR && *base != '\0')
+ if (*base != '/' && *base != '\0')
continue;
- while (*base == G_DIR_SEPARATOR) base++;
+ while (*base == '/') base++;
if (*base == '\0')
dest_path = g_strdup(new_path);
else
- dest_path = g_strconcat(new_path,
- G_DIR_SEPARATOR_S,
- base, NULL);
+ dest_path = g_strconcat(new_path, "/", base,
+ NULL);
debug_print("filter_rule_rename_dest_path(): "
"renaming %s -> %s\n",
action->str_value, dest_path);
@@ -1340,7 +1339,7 @@ void filter_rule_delete_action_by_dest_path(FilterRule *rule, const gchar *path)
if (action->str_value &&
!strncmp(path, action->str_value, pathlen) &&
- (action->str_value[pathlen] == G_DIR_SEPARATOR ||
+ (action->str_value[pathlen] == '/' ||
action->str_value[pathlen] == '\0')) {
debug_print("filter_rule_delete_action_by_dest_path(): "
"deleting %s\n", action->str_value);