]> spindle.queued.net Git - midori/commitdiff
Check for data folder relative to install on Windows
authorPaweł Forysiuk <tuxator@o2.pl>
Sun, 29 May 2011 15:19:10 +0000 (17:19 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 1 Jun 2011 22:57:40 +0000 (00:57 +0200)
midori/sokoke.c

index eacd455e86003a6077df654b1e0883d463fc2bdd..6e088a5de684af56a126926cb481dc2ad053b700 100644 (file)
@@ -1722,6 +1722,16 @@ sokoke_find_data_filename (const gchar* filename)
     const gchar* data_dir;
     gchar* path;
 
+    #ifdef G_OS_WIN32
+    gchar* install_path = g_win32_get_package_installation_directory_of_module (NULL);
+    path = g_build_filename (install_path, "share", filename, NULL);
+    g_free (install_path);
+    if (g_access (path, F_OK) == 0)
+        return path;
+
+    g_free (path);
+    #endif
+
     path = g_build_filename (g_get_user_data_dir (), filename, NULL);
     if (g_access (path, F_OK) == 0)
         return path;