aboutsummaryrefslogtreecommitdiff
path: root/libsylph/folder.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-03 08:19:56 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-03 08:19:56 +0000
commitb41a0d98336728e13c55170c8f5c6a2eb2825e9d (patch)
treec130de4ed1ed40c953e718ca3ac41f56775c9ba6 /libsylph/folder.c
parent582acbad25c722a39f6c7bb29c92c3933a964366 (diff)
fixed rename on win32.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@618 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/folder.c')
-rw-r--r--libsylph/folder.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/libsylph/folder.c b/libsylph/folder.c
index 56b23288..818f85b3 100644
--- a/libsylph/folder.c
+++ b/libsylph/folder.c
@@ -861,6 +861,14 @@ gchar *folder_get_path(Folder *folder)
g_warning("folder_get_path: faild to convert character set\n");
path = g_strdup(LOCAL_FOLDER(folder)->rootpath);
}
+ if (!g_path_is_absolute(path)) {
+ gchar *path_;
+
+ path_ = g_strconcat(get_mail_base_dir(),
+ G_DIR_SEPARATOR_S, path, NULL);
+ g_free(path);
+ path = path_;
+ }
} else if (FOLDER_TYPE(folder) == F_IMAP) {
g_return_val_if_fail(folder->account != NULL, NULL);
path = g_strconcat(get_imap_cache_dir(),
@@ -903,22 +911,11 @@ gchar *folder_item_get_path(FolderItem *item)
#endif
}
- if (g_path_is_absolute(folder_path)) {
- if (item_path)
- path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
- item_path, NULL);
- else
- path = g_strdup(folder_path);
- } else {
- if (item_path)
- path = g_strconcat(get_mail_base_dir(),
- G_DIR_SEPARATOR_S, folder_path,
- G_DIR_SEPARATOR_S, item_path, NULL);
- else
- path = g_strconcat(get_mail_base_dir(),
- G_DIR_SEPARATOR_S, folder_path,
- NULL);
- }
+ if (item_path)
+ path = g_strconcat(folder_path, G_DIR_SEPARATOR_S, item_path,
+ NULL);
+ else
+ path = g_strdup(folder_path);
g_free(item_path);
g_free(folder_path);