From dbd7b17de343dd5900d475844ba8a8c861bce8c9 Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 14 Mar 2006 10:51:49 +0000 Subject: 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 --- ChangeLog | 7 +++++++ ChangeLog.ja | 7 +++++++ libsylph/mh.c | 14 +++++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6f03db0e..cc3aa516 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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 diff --git a/ChangeLog.ja b/ChangeLog.ja index da215171..be360f11 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,10 @@ +2006-03-14 + + * libsylph/mh.c: mh_scan_tree_recursive(): Win32 でパスを比較するとき + に Unix パス区切りも許容するようにした(Win32 と Unix で設定ファイル + が共有されている場合に Win32 でフォルダツリーの再構築を行った場合 + サブフォルダが重複するのを修正)。 + 2006-03-14 * version 2.2.3 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; } -- cgit v1.2.3