[Xfce4-commits] <midori:master> Resolve symlink before looking for exec path
Christian Dywan
noreply at xfce.org
Mon Jun 11 23:10:02 CEST 2012
Updating branch refs/heads/master
to 4a1e547cdb771f8774b8cca924584931ec80b783 (commit)
from f71ebb53a91c0f56f5834d2918afa170643d245c (commit)
commit 4a1e547cdb771f8774b8cca924584931ec80b783
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Jun 4 22:38:14 2012 +0200
Resolve symlink before looking for exec path
midori/midori-app.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/midori/midori-app.c b/midori/midori-app.c
index 280ae1d..d6507e0 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -1402,6 +1402,7 @@ midori_app_setup (gchar** argument_vector)
GtkIconSet* icon_set;
GtkIconFactory* factory;
gsize i;
+ gchar* executable;
typedef struct
{
@@ -1537,8 +1538,10 @@ midori_app_setup (gchar** argument_vector)
#ifdef G_OS_WIN32
exec_path = g_win32_get_package_installation_directory_of_module (NULL);
#else
+ executable = g_file_read_link (command_line[0], NULL);
exec_path = g_file_get_path (g_file_get_parent (g_file_get_parent (g_file_new_for_path (
- g_find_program_in_path (command_line[0])))));
+ g_find_program_in_path (executable ? executable : command_line[0])))));
+ g_free (executable);
#endif
/* Print messages to stdout on Win32 console, cf. AbiWord
More information about the Xfce4-commits
mailing list