aboutsummaryrefslogtreecommitdiff
path: root/src/mh.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-28 09:47:22 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-28 09:47:22 +0000
commit5b270e9f2b530bc59dd7b339fbda03dc2e2dec4b (patch)
tree52f8f97b0d166625ab5b9dbd5835c4afaddba6b5 /src/mh.c
parent64b14ff62a62cd102ad8806c60ee56cb1e52b934 (diff)
put a warning if invalid filenames appear on the scan of MH folder.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@380 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/mh.c')
-rw-r--r--src/mh.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mh.c b/src/mh.c
index fff7c045..843802b2 100644
--- a/src/mh.c
+++ b/src/mh.c
@@ -1214,6 +1214,20 @@ static void mh_scan_tree_recursive(FolderItem *item)
continue;
}
#endif
+ if (g_utf8_validate(utf8name, -1, NULL) == FALSE) {
+ g_warning(_("Directory name\n"
+ "'%s' is not a valid UTF-8 string.\n"
+ "Maybe the locale encoding is used for filename.\n"
+ "If that is the case, you must set the following environmental variable\n"
+ "(see README for detail):\n"
+ "\n"
+ "\tG_FILENAME_ENCODING=@locale\n"),
+ utf8name);
+ g_free(entry);
+ g_free(utf8entry);
+ g_free(utf8name);
+ continue;
+ }
node = item->node;
for (node = node->children; node != NULL; node = node->next) {