[Xfce4-commits] <midori:master> Look for extensions relative to program folder on win32

Christian Dywan noreply at xfce.org
Tue Feb 16 01:04:05 CET 2010


Updating branch refs/heads/master
         to c90344ac4420405bf0476a9ddd26d5ae525f1f60 (commit)
       from f4b2111b403eaa74dc3fb9727be331f733ac3716 (commit)

commit c90344ac4420405bf0476a9ddd26d5ae525f1f60
Author: Peter de Ridder <peter at xfce.org>
Date:   Tue Feb 16 00:42:39 2010 +0100

    Look for extensions relative to program folder on win32

 midori/main.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 9c6848d..8c01f62 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -1076,7 +1076,22 @@ midori_load_extensions (gpointer data)
         GDir* extension_dir;
 
         if (!(extension_path = g_strdup (g_getenv ("MIDORI_EXTENSION_PATH"))))
+        {
+            #ifdef G_OS_WIN32
+            {
+                gchar *path = g_win32_get_package_installation_directory_of_module (NULL);
+                extension_path = g_build_filename (path, "lib", PACKAGE_NAME, NULL);
+                g_free (path);
+                if (g_access (extension_path, F_OK) != 0)
+                {
+                    g_free (extension_path);
+                    extension_path = g_build_filename (LIBDIR, PACKAGE_NAME, NULL);
+                }
+            }
+            #else
             extension_path = g_build_filename (LIBDIR, PACKAGE_NAME, NULL);
+            #endif
+        }
         extension_dir = g_dir_open (extension_path, 0, NULL);
         if (extension_dir != NULL)
         {



More information about the Xfce4-commits mailing list