[gnome-software] Try more prefixes to find iso-codes on *BSD



commit 2bbe064057f61e15a7373663527f43fdeb7ff618
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Wed Jan 27 10:49:29 2016 +0000

    Try more prefixes to find iso-codes on *BSD
    
    Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=760751
    Signed-off-by: Richard Hughes <richard hughsie com>

 src/gs-language.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-language.c b/src/gs-language.c
index a566e75..f35fa70 100644
--- a/src/gs-language.c
+++ b/src/gs-language.c
@@ -103,6 +103,16 @@ gs_language_populate (GsLanguage *language, GError **error)
                g_free (filename);
                filename = g_build_filename ("/usr", "share", "xml", "iso-codes", "iso_639.xml", NULL);
        }
+       /* FreeBSD and OpenBSD ports */
+       if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
+               g_free (filename);
+               filename = g_build_filename ("/usr", "local", "share", "xml", "iso-codes", "iso_639.xml", 
NULL);
+       }
+       /* NetBSD pkgsrc */
+       if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
+               g_free (filename);
+               filename = g_build_filename ("/usr", "pkg", "share", "xml", "iso-codes", "iso_639.xml", NULL);
+       }
        if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
                g_set_error (error, 1, 0, "cannot find source file : '%s'", filename);
                return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]