From 975da5d9646e83410e4fdd45e1138d31f8a2f629 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Mon, 4 Aug 2008 08:12:48 +0000 Subject: [PATCH] * Properly detect invalid windows folder names. Thx to djcb for the great catch pmo-trunk-r5248 --- src/modest-text-utils.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modest-text-utils.c b/src/modest-text-utils.c index e2802d8..b5e3c00 100644 --- a/src/modest-text-utils.c +++ b/src/modest-text-utils.c @@ -1373,10 +1373,8 @@ modest_text_utils_validate_folder_name (const gchar *folder_name) /* Cannot contain Windows port numbers. I'd like to use GRegex but it's still not available in Maemo. sergio */ - if (g_str_has_prefix (folder_name, "LTP") || - g_str_has_prefix (folder_name, "ltp") || - g_str_has_prefix (folder_name, "COM") || - g_str_has_prefix (folder_name, "com")) { + if (g_ascii_strncasecmp (folder_name, "LPT", 3) || + g_ascii_strncasecmp (folder_name, "COM", 3)) { glong val; gchar *endptr; -- 1.7.9.5