diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-03-14 10:51:49 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-03-14 10:51:49 +0000 |
commit | dbd7b17de343dd5900d475844ba8a8c861bce8c9 (patch) | |
tree | 8e7052af2c556e585023c5ff15bfc830ce05ee16 | |
parent | 7925290517e4ec3f4836a2c6d387e623c7a3a011 (diff) |
fixed duplicated subfolders when rebuilding folder tree on Win32 while settings were shared between Win32 and Unix.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1049 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.ja | 7 | ||||
-rw-r--r-- | libsylph/mh.c | 14 |
3 files changed, 27 insertions, 1 deletions
@@ -1,5 +1,12 @@ 2006-03-14 + * libsylph/mh.c: mh_scan_tree_recursive(): allow Unix path separator + when comparing path on Win32 (fixes duplicated subfolders when + rebuilding folder tree on Win32 while settings were shared between + Win32 and Unix). + +2006-03-14 + * version 2.2.3 2006-03-10 diff --git a/ChangeLog.ja b/ChangeLog.ja index da215171..be360f11 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,12 @@ 2006-03-14 + * libsylph/mh.c: mh_scan_tree_recursive(): Win32 でパスを比較するとき + に Unix パス区切りも許容するようにした(Win32 と Unix で設定ファイル + が共有されている場合に Win32 でフォルダツリーの再構築を行った場合 + サブフォルダが重複するのを修正)。 + +2006-03-14 + * version 2.2.3 2006-03-10 diff --git a/libsylph/mh.c b/libsylph/mh.c index aff7c2ee..99e87cb6 100644 --- a/libsylph/mh.c +++ b/libsylph/mh.c @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2005 Hiroyuki Yamamoto + * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1269,6 +1269,14 @@ static gboolean mh_remove_missing_folder_items_func(GNode *node, gpointer data) item = FOLDER_ITEM(node->data); +#if 0 + if (item->path && strchr(item->path, '/')) { + debug_print("folder '%s' includes Unix path separator. removing...\n", item->path); + folder_item_remove(item); + return FALSE; + } +#endif + path = folder_item_get_path(item); if (!is_dir_exist(path)) { debug_print("folder '%s' not found. removing...\n", path); @@ -1402,7 +1410,11 @@ static void mh_scan_tree_recursive(FolderItem *item) node = item->node; for (node = node->children; node != NULL; node = node->next) { FolderItem *cur_item = FOLDER_ITEM(node->data); +#ifdef G_OS_WIN32 + if (!path_cmp(cur_item->path, utf8entry)) { +#else if (!strcmp2(cur_item->path, utf8entry)) { +#endif new_item = cur_item; break; } |