Fix relative module paths
authorJohn Ralls <jralls@ceridwen.us>
Sat, 3 Nov 2012 18:46:59 +0000 (11:46 -0700)
committerJohn Ralls <jralls@ceridwen.us>
Sat, 8 Dec 2012 20:40:15 +0000 (12:40 -0800)
So that the created absolute path is where the modules are installed
instead of where the modules file is installed (i.e.,
lib/pango/1.8.0/modules instead of etc/pango).

pango/modules.c

index 644cc9c..c5a19f2 100644 (file)
@@ -450,11 +450,17 @@ process_module_file (FILE *module_file, const gchar *module_file_dir)
          switch (i)
            {
            case 0:
-             if (!g_path_is_absolute (tmp_buf->str)) {
-               const gchar *abs_file_name = g_build_filename (module_file_dir, tmp_buf->str, NULL);
-               g_string_assign (tmp_buf, abs_file_name);
-               g_free ((gpointer) abs_file_name);
-             }
+             if (!g_path_is_absolute (tmp_buf->str))
+               {
+                 const gchar *lib_dir = pango_get_lib_subdirectory ();
+                 const gchar *abs_file_name = g_build_filename (lib_dir,
+                                                                MODULE_VERSION,
+                                                                "modules",
+                                                                tmp_buf->str,
+                                                                NULL);
+                 g_string_assign (tmp_buf, abs_file_name);
+                 g_free ((gpointer) abs_file_name);
+               }
              pair->module = find_or_create_module (tmp_buf->str);
              break;
            case 1: