diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-10-06 09:12:08 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-10-06 09:12:08 +0000 |
commit | 5f667d42f46f4735b0e23c00467055fc7d93df8e (patch) | |
tree | 6ab96c1ab7d85bbd473625b63c54d246b479f5e5 | |
parent | 469c7a5cabfd8ad230bab13447a281ca296c5073 (diff) |
conv_filename_from_utf8(), conv_filename_to_utf8(): put an assertion.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@626 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 6 | ||||
-rw-r--r-- | libsylph/codeconv.c | 4 |
3 files changed, 16 insertions, 0 deletions
@@ -1,5 +1,11 @@ 2005-10-06 + * libsylph/codeconv.c: + conv_filename_from_utf8(), conv_filename_to_utf8(): put an + assertion. + +2005-10-06 + * libsylph/utils.c: don't define _s_tempnam() on Unix. * src/prefs_folder_item.c: added file system path info. diff --git a/ChangeLog.ja b/ChangeLog.ja index f5202399..28a2517c 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,11 @@ 2005-10-06 + * libsylph/codeconv.c: + conv_filename_from_utf8(), conv_filename_to_utf8(): assertion を + 追加。 + +2005-10-06 + * libsylph/utils.c: Unix では _s_tempnam() を定義しないようにした。 * src/prefs_folder_item.c: ファイルシステムのパス情報を追加。 diff --git a/libsylph/codeconv.c b/libsylph/codeconv.c index 20378fb8..830ebcce 100644 --- a/libsylph/codeconv.c +++ b/libsylph/codeconv.c @@ -1981,6 +1981,8 @@ gchar *conv_filename_from_utf8(const gchar *utf8_file) gchar *fs_file; GError *error = NULL; + g_return_val_if_fail(utf8_file != NULL, NULL); + fs_file = g_filename_from_utf8(utf8_file, -1, NULL, NULL, &error); if (error) { g_warning("failed to convert encoding of file name: %s\n", @@ -1998,6 +2000,8 @@ gchar *conv_filename_to_utf8(const gchar *fs_file) gchar *utf8_file; GError *error = NULL; + g_return_val_if_fail(fs_file != NULL, NULL); + utf8_file = g_filename_to_utf8(fs_file, -1, NULL, NULL, &error); if (error) { g_warning("failed to convert encoding of file name: %s\n", |