[Xfce4-commits] <midori:master> Check for data folder relative to install on Windows
Christian Dywan
noreply at xfce.org
Thu Jun 2 01:12:02 CEST 2011
Updating branch refs/heads/master
to 1b8bf1cd2b67a948e69d0b7dadc4052b1aec39ed (commit)
from 15a65b6166fded878450eda7a1d02aef85760686 (commit)
commit 1b8bf1cd2b67a948e69d0b7dadc4052b1aec39ed
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Sun May 29 17:19:10 2011 +0200
Check for data folder relative to install on Windows
midori/sokoke.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/midori/sokoke.c b/midori/sokoke.c
index eacd455..6e088a5 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -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;
More information about the Xfce4-commits
mailing list