File libgweather-bnc428346-bundle.patch of Package libgweather

Index: libgweather-2.24.1/libgweather/parser.c
===================================================================
--- libgweather-2.24.1.orig/libgweather/parser.c
+++ libgweather-2.24.1/libgweather/parser.c
@@ -171,6 +171,17 @@ gweather_parser_new (gboolean use_region
     /* First try to load a locale-specific XML. It's much faster. */
     filename = NULL;
     for (i = 0; parser->locales[i] != NULL; i++) {
+	filename = g_strdup_printf ("%s/%s/Locations.%s.xml",
+				    GWEATHER_XML_LOCATION_DIR,
+				    "bundle",
+				    parser->locales[i]);
+
+	if (g_file_test (filename, G_FILE_TEST_IS_REGULAR))
+	    break;
+
+	g_free (filename);
+	filename = NULL;
+
 	filename = g_strdup_printf ("%s/Locations.%s.xml",
 				    GWEATHER_XML_LOCATION_DIR,
 				    parser->locales[i]);
@@ -184,6 +195,17 @@ gweather_parser_new (gboolean use_region
         if (!zlib_support)
             continue;
 
+	filename = g_strdup_printf ("%s/%s/Locations.%s.xml.gz",
+				    GWEATHER_XML_LOCATION_DIR,
+				    "bundle",
+				    parser->locales[i]);
+
+	if (g_file_test (filename, G_FILE_TEST_IS_REGULAR))
+	    break;
+
+	g_free (filename);
+	filename = NULL;
+
 	filename = g_strdup_printf ("%s/Locations.%s.xml.gz",
 				    GWEATHER_XML_LOCATION_DIR,
 				    parser->locales[i]);
openSUSE Build Service is sponsored by