[gnome-initial-setup/85-gnome-intial-setup-segfaults-possibly-due-to-locale-related-problems: 3/6] language: suppress warnings for missing locales
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/85-gnome-intial-setup-segfaults-possibly-due-to-locale-related-problems: 3/6] language: suppress warnings for missing locales
- Date: Sun, 24 Nov 2019 07:40:19 +0000 (UTC)
commit da04c9c580b46d580f9c1b685c25b983fa111e11
Author: Will Thompson <will willthompson co uk>
Date: Sun Nov 24 07:22:59 2019 +0000
language: suppress warnings for missing locales
It's not an error for one of the default locales not to be present. See
https://gitlab.gnome.org/GNOME/gnome-initial-setup/issues/85.
gnome-initial-setup/pages/language/gis-welcome-widget.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gnome-initial-setup/pages/language/gis-welcome-widget.c
b/gnome-initial-setup/pages/language/gis-welcome-widget.c
index 7777638..39ad583 100644
--- a/gnome-initial-setup/pages/language/gis-welcome-widget.c
+++ b/gnome-initial-setup/pages/language/gis-welcome-widget.c
@@ -119,7 +119,11 @@ welcome (const char *locale_id)
locale = newlocale (LC_MESSAGES_MASK, locale_id, (locale_t) 0);
if (locale == (locale_t) 0)
{
- g_warning ("Failed to create locale %s: %s", locale_id, g_strerror (errno));
+ if (errno == ENOENT)
+ g_debug ("Failed to create locale %s: %s", locale_id, g_strerror (errno));
+ else
+ g_warning ("Failed to create locale %s: %s", locale_id, g_strerror (errno));
+
return "Welcome!";
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]