+ /* is it simply the same folder name? */
+ if (strcmp (name, new_name) == 0)
+ has_name = TRUE;
+ /* or is it the same when ignoring case (non-strict mode)? */
+ else if (non_strict && modest_text_utils_utf8_strcmp (name, new_name, TRUE) == 0)
+ has_name = TRUE;
+ /* or is the name equal to the display name of some folder, in the current locale? */
+ else if (non_strict) {
+ TnyFolderType type = modest_tny_folder_guess_folder_type (folder);
+ if (type != TNY_FOLDER_TYPE_INVALID && type != TNY_FOLDER_TYPE_NORMAL)
+ has_name = modest_text_utils_utf8_strcmp (modest_local_folder_info_get_type_display_name (type),
+ new_name,
+ TRUE);
+ } else
+ has_name = FALSE;
+