2005-06-25 [colin] 1.9.11cvs101
authorColin Leroy <colin@colino.net>
Sat, 25 Jun 2005 12:06:38 +0000 (12:06 +0000)
committerColin Leroy <colin@colino.net>
Sat, 25 Jun 2005 12:06:38 +0000 (12:06 +0000)
* src/mh.c
Fix path access with extended dir names
Fixes bug #589 (SC segfaults with wrong locale
settings)

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/mh.c

index 3f38d389195b890302dfdefe8dc1426d533fdf22..97b161ea582ea9fdfbff73ad9521339efd0e4413 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-25 [colin]     1.9.11cvs101
+
+       * src/mh.c
+               Fix path access with extended dir names
+               Fixes bug #589 (SC segfaults with wrong locale
+               settings)
+
 2005-06-25 [colin]     1.9.11cvs100
 
        * src/prefs_account.c
index 463c281ba94aea714ab09e09a72221fb13573cd9..618599fc471f9970b29f7b4a72b2529512d3df48 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.134 -r 1.382.2.135 src/compose.c;  cvs diff -u -r 1.49.2.48 -r 1.49.2.49 src/procmime.c;  cvs diff -u -r 1.17.2.9 -r 1.17.2.10 src/procmime.h;  cvs diff -u -r 1.22.2.8 -r 1.22.2.9 src/quote_fmt_parse.y;  ) > 1.9.11cvs98.patchset
 ( cvs diff -u -r 1.382.2.135 -r 1.382.2.136 src/compose.c;  cvs diff -u -r 1.22.2.9 -r 1.22.2.10 src/quote_fmt_parse.y;  ) > 1.9.11cvs99.patchset
 ( cvs diff -u -r 1.105.2.25 -r 1.105.2.26 src/prefs_account.c;  cvs diff -u -r 1.49.2.11 -r 1.49.2.12 src/prefs_account.h;  cvs diff -u -r 1.382.2.136 -r 1.382.2.137 src/compose.c;  ) > 1.9.11cvs100.patchset
+( cvs diff -u -r 1.79.2.13 -r 1.79.2.14 src/mh.c;  ) > 1.9.11cvs101.patchset
index 85cf653fbd47bfcdd815c25ecdb6458be5e31b9c..c0f95f6b35c967d08dea7700cc7d85d5918af0d6 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=100
+EXTRA_VERSION=101
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index f5ecf262fe8bd24b284feb6c7939e21055d6a5d8..e085a1fd92f7862a8d9fed436cfbe676cc7f1801 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -598,7 +598,7 @@ static gint mh_create_tree(Folder *folder)
 static gchar *mh_item_get_path(Folder *folder, FolderItem *item)
 {
        gchar *folder_path, *path;
-
+       gchar *real_path;
        g_return_val_if_fail(folder != NULL, NULL);
        g_return_val_if_fail(item != NULL, NULL);
 
@@ -621,8 +621,9 @@ static gchar *mh_item_get_path(Folder *folder, FolderItem *item)
                                            folder_path, NULL);
         }
        g_free(folder_path);
-
-       return path;
+       real_path = mh_filename_from_utf8(path);
+       g_free(path);
+       return real_path;
 }
 
 static FolderItem *mh_create_folder(Folder *folder, FolderItem *parent,
@@ -994,14 +995,10 @@ static gboolean mh_rename_folder_func(GNode *node, gpointer data)
 
 static gchar *mh_filename_from_utf8(const gchar *path)
 {
-       const gchar *src_codeset = CS_UTF_8;
-       const gchar *dest_codeset = conv_get_locale_charset_str();
-       gchar *real_path;
+       gchar *real_path = g_filename_from_utf8(path, -1, NULL, NULL, NULL);
 
-       real_path = conv_codeset_strdup(path, src_codeset, dest_codeset);
        if (!real_path) {
                g_warning("mh_filename_from_utf8: faild to convert character set\n");
-               /* FIXME: show dialog? */
                real_path = g_strdup(path);
        }
 
@@ -1010,14 +1007,9 @@ static gchar *mh_filename_from_utf8(const gchar *path)
 
 static gchar *mh_filename_to_utf8(const gchar *path)
 {
-       const gchar *src_codeset = conv_get_locale_charset_str();
-       const gchar *dest_codeset = CS_UTF_8;
-       gchar *utf8path;
-
-       utf8path = conv_codeset_strdup(path, src_codeset, dest_codeset);
+       gchar *utf8path = g_filename_to_utf8(path, -1, NULL, NULL, NULL);
        if (!utf8path) {
                g_warning("mh_filename_to_utf8: faild to convert character set\n");
-               /* FIXME: show dialog? */
                utf8path = g_strdup(path);
        }