aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-02-16 05:10:39 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-02-16 05:10:39 +0000
commit757ef705ea742351f83f7bbe37dc5b15a6f24a15 (patch)
tree9b3ac08e6f281a23368c6b50e09d4487eb15c73b
parent97ed0dd90a111dc83c5557b07cac2f0ea8d72677 (diff)
use filesystem encoding for MIME temporary filename.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@109 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/procmime.c7
3 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 73a20e44..b3b2fa80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-16
+
+ * src/procmime.c: procmime_get_tmp_file_name(): convert filename
+ to filesystem encoding.
+
2005-02-14
* src/intl.h: removed.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 58dbf804..5318a2ae 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,8 @@
+2005-02-16
+
+ * src/procmime.c: procmime_get_tmp_file_name(): ファイル名をファイル
+ システムエンコーディングに変換。
+
2005-02-14
* src/intl.h: 削除。
diff --git a/src/procmime.c b/src/procmime.c
index 2ee91c96..eabeb853 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -863,20 +863,23 @@ gchar *procmime_get_tmp_file_name(MimeInfo *mimeinfo)
g_snprintf(f_prefix, sizeof(f_prefix), "%08x.", id++);
if (MIME_TEXT_HTML == mimeinfo->mime_type)
- base = "mimetmp.html";
+ base = g_strdup("mimetmp.html");
else {
const gchar *base_;
+
base_ = mimeinfo->filename ? mimeinfo->filename
: mimeinfo->name ? mimeinfo->name : "mimetmp";
base_ = g_basename(base_);
if (*base_ == '\0') base_ = "mimetmp";
- Xstrdup_a(base, base_, return NULL);
+ base = conv_filename_from_utf8(base_);
subst_for_filename(base);
}
filename = g_strconcat(get_mime_tmp_dir(), G_DIR_SEPARATOR_S,
f_prefix, base, NULL);
+ g_free(base);
+
return filename;
}