aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--libsylph/imap.c16
3 files changed, 22 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9296dc3d..af14074a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-02
+
+ * libsylph/imap.c: imap_rename_folder_real(): fixed crash when tried
+ to move folders right under the root folder.
+
2006-03-01
* src/alertpanel.c: place dialog center if it is out of range (fixes
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 535ea4fe..ac9ab30b 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,8 @@
+2006-03-02
+
+ * libsylph/imap.c: imap_rename_folder_real(): フォルダをルートフォルダ
+ 直下に移動しようとするとクラッシュするのを修正。
+
2006-03-01
* src/alertpanel.c: ダイアログが範囲外の位置にあれば中央に配置する
diff --git a/libsylph/imap.c b/libsylph/imap.c
index 2d395044..353b05f2 100644
--- a/libsylph/imap.c
+++ b/libsylph/imap.c
@@ -2159,14 +2159,22 @@ static gint imap_rename_folder_real(Folder *folder, FolderItem *item,
separator = imap_get_path_separator(IMAP_FOLDER(folder), item->path);
if (new_parent) {
if (name) {
- newpath = g_strconcat(new_parent->path,
- G_DIR_SEPARATOR_S, name, NULL);
+ if (new_parent->path)
+ newpath = g_strconcat(new_parent->path,
+ G_DIR_SEPARATOR_S, name,
+ NULL);
+ else
+ newpath = g_strdup(name);
} else {
gchar *name_;
name_ = g_path_get_basename(item->path);
- newpath = g_strconcat(new_parent->path,
- G_DIR_SEPARATOR_S, name_, NULL);
+ if (new_parent->path)
+ newpath = g_strconcat(new_parent->path,
+ G_DIR_SEPARATOR_S, name_,
+ NULL);
+ else
+ newpath = g_strdup(name_);
AUTORELEASE_STR(name_, );
name = name_;
}