Don't attempt to concat absolute CONFIG_LOCALE with the base path
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sun, 21 Jun 2009 13:23:50 +0000 (13:23 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sun, 21 Jun 2009 13:23:50 +0000 (13:23 +0000)
git-svn-id: https://s.snth.net/svn/neverball/trunk@2899 78b8d119-cf0a-0410-b17c-f493084dd1d7

share/lang.c

index 8e85a95..999c239 100644 (file)
@@ -36,7 +36,12 @@ void lang_init(const char *domain)
     char *dir = strdup(getenv("NEVERBALL_LOCALE"));
 
     if (!dir)
-        dir = concat_string(fs_base_dir(), "/", CONFIG_LOCALE, NULL);
+    {
+        if (path_is_abs(CONFIG_LOCALE))
+            dir = strdup(CONFIG_LOCALE);
+        else
+            dir = concat_string(fs_base_dir(), "/", CONFIG_LOCALE, NULL);
+    }
 
     errno = 0;